How to setup npm token to install Streamline Icon packages

How to setup npm token to install Streamline Icon packages

For the latest information please read this document instead:

Deprecated wrapper/asset packages

Warning, wrapper packages for React, Angular and Vue are deprecated and will be removed on June 1st 2021. Please use our new package streamlinehq instead, it provides a much better user experience.

If you still wish to use the old packages, read on.

If you want to use Streamline Icon packages you need to configure your npm token in your dev machine.

🚧

During ßeta, only the "Streamline Ultimate" customers have access to the NPM packages (if you own the Streamline Essential pack, you can upgrade by emailing us )

1. Start by copying your auth token

Navigate to "My Account" > "Developer Tools"

image

Activate the NPM React Package

image

Copy your token

image

2. Add the registry to your package manager

a. Per project setup (recommended)

Create a .npmrc at the root of your folder and add these lines:

@streamlinehq:registry=https://npm.cloudsmith.io/streamlinehq/streamline-icons/
//npm.cloudsmith.io/streamlinehq/streamline-icons/:_authToken=YOUR_TOKEN_HERE

Please note that this file shouldn't be committed to your production servers. You can use pre-build hooks to set up your configuration on the server.

b. Global setup

If you are using NPM:

npm config list
npm config set '@streamlinehq:registry' https://npm.cloudsmith.io/streamlinehq/streamline-icons/
npm config set "//npm.cloudsmith.io/streamlinehq/streamline-icons/:_authToken" TOKEN

If you are using Yarn:

yarn config list
yarn config set "@streamlinehq:registry" https://npm.cloudsmith.io/streamlinehq/streamline-icons/ --global
yarn config set "//npm.cloudsmith.io/streamlinehq/streamline-icons/:_authToken" TOKEN --global

We've noticed that when you use commands like yarn add it works perfectly fine, but, sometimes yarn config set commands fails (we do not know why β€” no need to reach us for this β€” our engineering team has raised a flag to Yarn core team). You can try npm config set which should work fine.

Congratulations, your setup is done! πŸŽ‰

You can now proceed with installing Streamline Icon packages and rendering them using Streamline Wrapper packages. Check our document to understand next steps or read the troubleshooting guide there:

.