This is an example repository for starting out with a local development verdaccio registry on your local computer.
What does this do for you?
- Publish npm modules to a non-public registry for sanity testing
- Consume published npm modules version from the local registry to verify it works on import
npm install -g npmrc
npmrc -c local
npm server
npm adduser --registry http://localhost:4873/
npm config set registry http://localhost:4873/
This folder is literally it's own contained verdaccio implementation. The following files/directories are:
-
config.yaml
Verdaccio configuration file with suitable defaults for getting started
-
storage
This is where verdaccio will store its published packages. Deletion of these packages will remove them from the registry.
-
htpasswd
This is the password file that is generated when you log into this registry with:
npm adduser --registry http://localhost:4873/
If you've set up your npmrc local and logged in to this repo, then you should be able to publish right away to the verdaccio repo when it's running.
# From your local project repo
npmrc local
yarn publish
Now you should be able to see the new module in the verdaccio web UI, and in the storage folder!
As long as you keep your npmrc set to local, you can also install the same package and it will pull from verdaccio.
yarn add my-package
If you would like to quickly reset the packages in your verdaccio repo, you should:
-
Stop your verdaccio instance
-
Run
yarn clean-storage