Skip to content

Commit

Permalink
fix: install dependencies in tokens module after installing Paragon
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorrusakov committed Feb 16, 2023
1 parent eb1d19c commit 0b809c0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ dependent-usage-analyzer/
build-scss.js
component-generator/
example/
style-dictionary-build/
build-tokens.js
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ jest*
dist
src/i18n/transifex_input.json
src/i18n/temp
style-dictionary-build

# gatsby files
www/.cache/
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
],
"sideEffects": false,
"scripts": {
"postinstall": "cd ./tokens && npm ci",
"generate-component-install": "cd component-generator && npm install",
"consumer-app-install": "cd example && npm install",
"doc-site-install": "cd www && npm install",
Expand Down
9 changes: 4 additions & 5 deletions tokens/build-tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ const StyleDictionary = require('./style-dictionary');
program
.version('0.0.1')
.description('CLI to build design tokens for various platforms (currently only CSS is supported) from Paragon Design Tokens.')
.option('--prefix <char>', 'A prefix that will be added to the names of all built tokens.', 'pgn')
.option('--build-dir <char>', 'A path to directory where to put files with built tokens, must end with a /.', './build/')
.option('--tokens-source <char>', 'A path where to look for additional tokens that will get merged with Paragon ones, accepts glob patterns, e.g. "mytokens/**/*.json". Only json files are allowed.')
.parse()
.option('--source <char>', 'A path where to look for additional tokens that will get merged with Paragon ones, accepts glob patterns, e.g. "mytokens/**/*.json". Only json files are allowed.')
.parse();

const { prefix, buildDir, tokensSource } = program.opts();
const { buildDir, source: tokensSource } = program.opts();
const source = tokensSource ? [tokensSource] : [];

const config = {
include: [path.resolve(__dirname, 'src/**/*.json')],
source,
platforms: {
css: {
prefix,
prefix: 'pgn',
transformGroup: 'css',
buildPath: buildDir,
files: [
Expand Down

0 comments on commit 0b809c0

Please sign in to comment.