Novo Design Tokens are in a separate repository that can be symlinked into any dependant project for easy development and testing. You can use
npm link
to create the link andnpm link novo-design-tokens
to install your local version.
- Clone the novo-design-tokens repository.
git clone https://github.com/bullhorn/novo-design-tokens.git
- Go to the root of the project and install dependencies with
npm install
.
cd novo-design-tokens
npm install
- Build the design tokens.
npm run build
To add new tokens, you first need to create a .js
file in the tokens
directory. Once you’ve created the .js
file you add the tokens to it. You can read about how to define new tokens here. The token files follow the Category / Type / Item structure. You can use any of the existing token files as reference.
After the .js
file with the tokens is done, you'll need to include it in the build process for the tokens to be built. To do that you need to add a new property to the index.js
file.
NOTE: we are using v3 of the style-dictionary
project.
Let’s say that we wanted to add a bar.js
file at the location tokens/foo
to the build process. In the `
Find the token you want to update and replace the value in the value
field with the new one.