UNPKG

@terrazzo/cli

Version:

CLI for managing design tokens using the Design Tokens Community Group (DTCG) standard and generating code for any platform via plugins.

48 lines 1.52 kB
import { type ConfigInit, type Logger } from '@terrazzo/parser'; export declare const cwd: URL; export declare const DEFAULT_CONFIG_PATH: URL; export declare const DEFAULT_TOKENS_PATH: URL; export type Command = 'build' | 'check' | 'help' | 'init' | 'version'; export declare const GREEN_CHECK: string; export interface Flags { /** --config, -c */ config?: string; /** --out, -o */ out?: string; /** --help */ help?: boolean; /** --watch, -w */ watch?: boolean; /** --version */ version?: boolean; } export interface LoadConfigOptions { cmd: Command; flags: Flags; logger: Logger; } /** Load config */ export declare function loadConfig({ cmd, flags, logger }: LoadConfigOptions): Promise<{ config: ConfigInit; configPath: string; }>; /** load tokens */ export declare function loadTokens(tokenPaths: URL[], { logger }: { logger: Logger; }): Promise<{ filename: URL; src: string; }[] | undefined>; /** Print error */ export declare function printError(message: string): void; /** Print success */ export declare function printSuccess(message: string, startTime?: number): void; /** Resolve config */ export declare function resolveConfig(filename?: string): string | undefined; /** Resolve tokens.json path (for lint command) */ export declare function resolveTokenPath(filename: string, { logger }: { logger: Logger; }): URL; /** Print time elapsed */ export declare function time(start: number): string; //# sourceMappingURL=shared.d.ts.map