hokit 1.0.1 → 1.2.0-beta.1

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.
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import{n as e,t}from"../lint-B7CfdNnF.js";import n from"node:path";const r=process.argv[2],i=await import(n.join(process.cwd(),`hokit.config.ts`));switch(r){case`build`:await e(...i.default.snippets);break;case`lint`:await t(...i.default.snippets);break;default:console.log(`
3
+ Hokit
4
+
5
+ Usage:
6
+
7
+ hokit build
8
+ hokit lint
9
+ `)}export{};
package/dist/index.d.ts CHANGED
@@ -1,39 +1,47 @@
1
+ //#region src/types/snippet.d.ts
1
2
  type Scope = "typescript" | "javascript" | "typescriptreact" | "javascriptreact" | "html" | "json";
2
3
  interface Snippet {
3
- name: string;
4
- scope: Scope[];
5
- prefix: string;
6
- body: string[];
7
- description?: string;
8
- isFileTemplate?: boolean;
9
- tags: string[];
4
+ name: string;
5
+ scope: Scope[];
6
+ prefix: string;
7
+ body: string[];
8
+ description?: string;
9
+ isFileTemplate?: boolean;
10
+ tags: string[];
10
11
  }
11
-
12
+ //#endregion
13
+ //#region src/builder/snippet.builder.d.ts
12
14
  declare class SnippetBuilder {
13
- private snippet;
14
- name(name: string): this;
15
- scope(scope: Scope[]): this;
16
- prefix(prefix: string): this;
17
- body(snippet: string[]): this;
18
- describe(description: string): this;
19
- template(isFileTemplate?: boolean): this;
20
- tag(tags: string[]): this;
21
- /**
22
- * Build the final object.
23
- */
24
- build(): Snippet;
15
+ private snippet;
16
+ name(name: string): this;
17
+ scope(scopes: Scope[]): this;
18
+ prefix(prefix: string): this;
19
+ body(snippet: string[]): this;
20
+ describe(description: string): this;
21
+ template(isFileTemplate?: boolean): this;
22
+ tag(tags: string[]): this;
23
+ /**
24
+ * Build the final object.
25
+ */
26
+ build(): Snippet;
25
27
  }
26
-
28
+ //#endregion
29
+ //#region src/define-config.d.ts
27
30
  interface Config {
28
- output: string;
29
- snippets: SnippetBuilder[];
31
+ output: string;
32
+ snippets: SnippetBuilder[];
30
33
  }
31
34
  declare function defineCofig(config: Config): Config;
32
-
35
+ //#endregion
36
+ //#region src/build.d.ts
33
37
  declare function build(...config: Config[]): Promise<void>;
34
-
38
+ //#endregion
39
+ //#region src/lint.d.ts
40
+ declare function lint(...configs: Config[]): Promise<void>;
41
+ //#endregion
42
+ //#region src/registry.d.ts
35
43
  declare abstract class Registry {
36
- static name(name: string): SnippetBuilder;
44
+ static name(name: string): SnippetBuilder;
37
45
  }
38
-
39
- export { Registry, type Snippet, build, defineCofig };
46
+ //#endregion
47
+ export { Registry, type Snippet, build, defineCofig, lint };