Example Bundling of Package with NPM
Install Verdaccio
Section titled “Install Verdaccio”npm install verdaccioverdaccio
Create example package
Section titled “Create example package”head -c 100M </dev/urandom > myfile
mkdir -p myPackage/files/tar -czf ./myPackage/files/myPackage-1.0.0.tgz myfile
Create package.json file inside myPackage
Section titled “Create package.json file inside myPackage”{"name": "myPackage","version": "1.0.0","description": "A generic package tarball","main": "index.js","files": [ "files/myPackage-1.0.0.tgz"]}
Package and upload to local npm server
Section titled “Package and upload to local npm server”npm pack myPackagenpm publish myPackage --registry http://localhost:4873
Install and view package
Section titled “Install and view package”npm install myPackage --registry http://localhost:4873ls -grtha ./*myPackage*