npm Packages
  • 28 Aug 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

npm Packages

  • Dark
    Light
  • PDF

Article summary

Getting started

  1. Log in with the Crowdbotics CLI:

    cb login
  2. Set up your npm config files:

    echo "@pkg:registry=https://pkg.crowdbotics.com/npm" >> .npmrc
    echo "//pkg.crowdbotics.com/:_authToken=Token $(npx node-jq -r ".token" ~/.crowdbotics/auth.json)" >> .npmrc

Publishing packages

Publishing packages with npm is very straightforward.

  1. Create a new package with:

    npm init
  2. Name your package @pkg/<your-package-name-here> and publish it with:

    npm publish


A full example is available at:
https://github.com/crowdbotics/pkg-npm-packaging-tutorial

Package visibility

In the current version of the system, all published packages are available to all users in your organization; only the package author or the organization owner can publish new versions.
Fine-grained access control settings will be available in a future release.


Was this article helpful?

What's Next