Design Tokens are essential particles of a design system, specifically, they are variables that store visual design attributes. They can contain colors (hex, RGBA or other values), sizing units (pixels, rems, etc.) and many more. They're essential for creating and maintaing a consistent visual system.
This is a monorepository for all Envato Foundation Design System tokens build with lerna.js.
To install all the tokens from the Foundation Design System:
$ npm i @envato/foundation-design-system-tokensTo install only the colors tokens from the Foundation Design System:
$ npm i @envato/foundation-design-system-tokens-colorsEach package includes a .css, .js, .sass, .scss that can be imported in your projects:
import('@envato/foundation-design-system-tokens-colors/')or
@import "@envato/foundation-design-system-tokens-colors/dist/index.css";Make sure you have lerna.js installed globally:
npm install --global lerna@2.2.0Install dependencies for all packages:
$ lerna bootstrapTo build target style files from tokens run:
$ lerna run buildTo publish a version for all packages run:
$ lerna publishNote: When you make changes to one of the packages, lerna.js will auto detect which version has been updated and only prompt you to bump the version of that particular package.
To publish a beta version for packages run:
$ lerna publish --npm-tag=betaTo publish a scoped package as public, you need to add the following into the package.json in each package.
"publishConfig": {
"access": "public"
}
MIT