Testing while developing local
Testing locally with another project
In the website-build-tools
library path use npm link
to add the project to the local npm registry.
cd ./route-to-library
npm link
In the project's folder that you want to use this library, use npm link @aptuitiv/website-build-tools
to install the package locally.
npm link @aptuitiv/website-build-tools
If you need to update the rets-client library do the following.
Unlink the project
You should unlink the local project for any of these situations:
- You are switching branches.
- You are adding or removing node modules in this project. (This doesn't apply if you're adding or removing node modules in the project that uses this library.)
- You want to use the live version of this package from NPM.
First, in the project that uses this library:
npm unlink @aptuitiv/website-build-tools --no-save
The --no-save
flag keeps the original live version of this package from NPM.
Then, in this package:
npm unlink
Resources
- NPM Linking and Unlinking.
- Understanding npm-link.
- How to Test a Node (npm) Package Locally.
- Other option wth tarballs Use npm pack to test your packages locally.