ShtukbaseStandard
archivo del paquete→ .shtukbase/packages/shtukbase-style/lib/stylelib.ts

lib/stylelib.ts

17 líneas, 872 B.

El archivo tal como está en el paquete: el código y sus comentarios no se traducen.

  1. // Shared by the actions and checks of shtukbase-style. The working directory is the project root.
  2. // The style lives in /design/shtukbase-style/. Its CSS is built with the library of the design-tokens package
  3. // (`styleConfig` of a style package: tokens.json and tokens.dark.json into tokens.css, dark on `.dark, [data-theme="dark"]`).
  4. import { build, styleConfig } from '../../design-tokens/actions/tokenslib.ts';
  5. export const ID = 'shtukbase-style';
  6. export const DIR = `design/${ID}`;
  7. export const TOKENS = `${DIR}/tokens.json`;
  8. export const DARK = `${DIR}/tokens.dark.json`;
  9. export const CSS = `${DIR}/tokens.css`;
  10. export type Built = { text: string; problems: string[] };
  11. /** The tokens.css that the tokens of the style give now (or the problems of the tokens). */
  12. export function buildStyle(root = process.cwd()): Built {
  13. return build(root, styleConfig(ID));
  14. }