From 0b809c05a9c7696807d276cbfaf7011110cbe106 Mon Sep 17 00:00:00 2001 From: Viktor Rusakov <52399399+viktorrusakov@users.noreply.github.com> Date: Mon, 19 Dec 2022 16:04:46 +0200 Subject: [PATCH] fix: install dependencies in tokens module after installing Paragon --- .eslintignore | 2 -- .gitignore | 1 - package.json | 1 + tokens/build-tokens.js | 9 ++++----- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.eslintignore b/.eslintignore index 0783b219a7..a693875c8a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,5 +7,3 @@ dependent-usage-analyzer/ build-scss.js component-generator/ example/ -style-dictionary-build/ -build-tokens.js diff --git a/.gitignore b/.gitignore index 4581cfa3b1..986dbca569 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ jest* dist src/i18n/transifex_input.json src/i18n/temp -style-dictionary-build # gatsby files www/.cache/ diff --git a/package.json b/package.json index d5d269d73c..5c4a4a5d83 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tokens/build-tokens.js b/tokens/build-tokens.js index 20ad90ec5d..88e805d58b 100755 --- a/tokens/build-tokens.js +++ b/tokens/build-tokens.js @@ -6,12 +6,11 @@ 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 ', 'A prefix that will be added to the names of all built tokens.', 'pgn') .option('--build-dir ', 'A path to directory where to put files with built tokens, must end with a /.', './build/') - .option('--tokens-source ', '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 ', '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 = { @@ -19,7 +18,7 @@ const config = { source, platforms: { css: { - prefix, + prefix: 'pgn', transformGroup: 'css', buildPath: buildDir, files: [