Issue
I have created Angular library contain modules each module contain services.
I need to make a test If I change one of these services.
The question, Is there a good and simple way to test the library without the need to publish it and install it in the main project?.
Solution
Thanks for yurzui, about the comment that show me the way.
I have used this, inside the library:
npm install
npm run build
npm link ./dist/<library_name>
and inside the project, I have removed the dependency and make:
npm install
npm link <library_name>
npm start
There is also another way by copying the file to the library, I have do it by using a watcher that will run after building a library and copy it to the target project.
Answered By - Ebraheem Alrabeea
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.