For fun and learn
- Build library
pnpm build
- From within your npm package directory, run
npm pack
in your terminal. Note the .tgz file it produces and the location of it. - Change directories to the project directory where you want to use the npm package. Example: cd /path/to/project
- From within the client project directory, run
pnpm install /path/to/qnf-js-lib.tgz
but replace it with the proper path to the location of the .tgz file from step 1 - Then you can start using the package in that client project to test things out This will give you the closest to production experience for using your npm package.
- Build library
pnpm build
- From within your npm package directory run
npm link
in your terminal - Change directories to the project directory where you want to use the npm package. Example:
cd /path/to/project
- From within the client project directory run
npm link @r2kode/qnf-jslib
- Build library
pnpm build
- From within your client project directory run
pnpm install /path/to/your/qnf-js-lib
in your terminal