NPM: Publishing Generic Packages with Verdaccio
Good article maven reposilite setup
Install Verdaccio
Section titled “Install Verdaccio”npm install verdaccioverdaccioCreate 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 myfileCreate 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:4873Install and view package
Section titled “Install and view package”npm install myPackage --registry http://localhost:4873ls -grtha ./*myPackage*