ShtukbaseStandard
包文件→ .shtukbase/packages/design-tokens/skeleton/style/actions/build.ts

skeleton/style/actions/build.ts

9 行, 603 B.

文件按包中的原样显示:代码及其注释不做翻译。

  1. // `build` of the skeleton style: writes /design/my-style/tokens.css from tokens.json and tokens.dark.json with the build
  2. // library of design-tokens (the same as `shtuk run design-tokens build --style my-style`). When you rename the style, change ID.
  3. // The path below is right once this folder is a package next to design-tokens (packages/<id>/ and packages/design-tokens/).
  4. import { buildStyle } from '../../design-tokens/actions/build.ts';
  5. const ID = 'my-style';
  6. const r = buildStyle(ID, process.cwd());
  7. console.log(r.message.replace(/^design-tokens:/, `${ID}:`));
  8. if (!r.ok) process.exitCode = 1;