@collabur/ds-scripts
v0.2.6
Published
Collabur DS Scripts
Downloads
9
Readme
Development
To work on the project run yarn install && yarn start
to install dependencies and start webpack dev with watch.
How it works
Add!
Usage Example
The project includes an example to test the usage of the scripts.
- Copy
.env.sample
into/example
and rename to.env
- Replace the sample values in
.env
with valid ones - If using a different API endpoint to https://dev.api-2.collabur.com, add
COLLABUR_API={new endpoint}
to.env
- Run
yarn example
from the project root
The example/src
folder should now include any mapped template files and assets generated by the scripts.
Publishing
The package will be published automatically when a new release is published on Github. This will happen via Github Actions.
Usage
To use the scripts in a design system project:
yarn add @collabur/ds-scripts --dev
to install the package in your project- Paste the following variables into the appropriate .env files, replace the values with real ones:
COLLABUR_DS=designsystem
COLLABUR_DS_BRANCH=master
COLLABUR_ACCESS_TOKEN=abcd.1234
- Paste the following into a
cds.config.yml
file in your project root:
ds:
defaultUnit: rem
fontDir: src/assets/fonts
iconDir: src/assets/icons
brandDir: src/assets/brand
map:
rootDir: src
storybookDir: .storybook
ignore: []
passes: 1
targetTag: "###"
- Add Collabur scripts commands into your package scripts where desired.