In this quick run through, we will see how you can simply publish a package into your Nplfared
registry.
This will allow you easily share private package for your project and share them with your team 🤝.
Let's create a simple package that will be published into our registry.
Let's add some code to our package
Now we need to update our package.json
file
You need to add a publishConfig
property to our package.json
file.
This property will allow us to specify the registry where we want to publish our package.
You will need to replace http://your-npflared-registry.dev
with your own registry url.
If you already have a token with dedicated permission you can skip this section
Check this in order to generate a new token
In order to authenticate to your registry you will need to add a .npmrc
file with the following content
You can now download, upgrade and consume your package 🔥
First make to have setup an .npmrc
file with a token having the right accesses.
Then you can run the following command:
If you make change to your package, you will need to publish a new version.
This is really easy, you will need to bump the package version in your package.json
file and then hit the publish button again !