@sudajs/cli 0.5.5 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,22 @@
1
1
  #!/usr/bin/env node
2
+ import { ThemeModule } from '@sudajs/theme-engine';
2
3
  import { Command } from 'commander';
3
4
 
5
+ interface ValidatedTheme {
6
+ root: string;
7
+ module: ThemeModule;
8
+ serverEntryPath: string;
9
+ clientEntryPath: string | null;
10
+ stylesheetPath: string | null;
11
+ }
12
+ declare function validateTheme(root: string): Promise<ValidatedTheme>;
13
+ declare function buildTheme(root: string): Promise<ValidatedTheme>;
14
+ declare function finalizeTheme(root: string): Promise<ValidatedTheme>;
15
+ declare function findAnchorTagByHref(html: string, href: string): string | null;
16
+ declare const __testUtils: {
17
+ findAnchorTagByHref: typeof findAnchorTagByHref;
18
+ };
19
+ declare function watchTheme(root: string, port: number): Promise<void>;
4
20
  /**
5
21
  * 解析人机交互的 `key@version` 格式。允许仅 `key`,也允许带 version。
6
22
  * 注意:theme key 现行约束不含 `@`,所以从右侧第一个 `@` 之后视为 version。
@@ -11,7 +27,8 @@ declare function parseThemeRef(value: string): {
11
27
  key: string;
12
28
  version?: string;
13
29
  };
30
+ declare function initTheme(target: string): Promise<void>;
14
31
  declare function buildProgram(): Command;
15
32
  declare function main(): Promise<void>;
16
33
 
17
- export { buildProgram, main, parseThemeRef };
34
+ export { __testUtils, buildProgram, buildTheme, finalizeTheme, initTheme, main, parseThemeRef, validateTheme, watchTheme };