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.
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +9 -0
- package/dist/index.d.ts +36 -28
- package/dist/index.js +1 -14684
- package/dist/lint-B7CfdNnF.js +1 -0
- package/package.json +8 -4
|
@@ -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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
29
|
-
|
|
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
|
-
|
|
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 };
|