Package Registry
npm
Publish packages
Read on to learn how to publish packages to our npm registry.
Create a package
Before you can publish your first package, you need to register your package vie the Console.
Navigate to the Packages page and click on the Create Package
button.
Enter all required information and click on the Create
button.
Create a token
Next, you need to create a token via the Console.
Navigate to the Tokens page and click on the Create Token
button.
Enter all required information and click on the Create
button.
Copy the token and save it in a safe place.
Configure npm
Run the following commands to configure npm
:
Terminal
npm config set "@<PACKAGE-SCOPE>:registry" https://npm.registry.pkghub.io
npm config set "//npm.registry.pkghub.io/:_authToken" <TOKEN>
Attention: Replace <PACKAGE-SCOPE>
with your package scope and <TOKEN>
with your token.
Publish your package
Once you have configured npm, you can publish your package:
Terminal
npm publish