@gtkx/cli 0.9.4 → 0.10.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/bin/gtkx.js +2 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +1 -0
- package/dist/create.d.ts +37 -6
- package/dist/create.js +44 -996
- package/dist/dev-server.d.ts +26 -4
- package/dist/dev-server.js +64 -9
- package/dist/refresh-runtime.d.ts +9 -0
- package/dist/refresh-runtime.js +44 -0
- package/dist/templates.d.ts +8 -0
- package/dist/templates.js +18 -0
- package/dist/vite-plugin-gtkx-refresh.d.ts +7 -0
- package/dist/vite-plugin-gtkx-refresh.js +36 -0
- package/dist/vite-plugin-swc-ssr-refresh.d.ts +7 -0
- package/dist/vite-plugin-swc-ssr-refresh.js +45 -0
- package/package.json +14 -5
- package/templates/claude/EXAMPLES.md.ejs +364 -0
- package/templates/claude/SKILL.md.ejs +372 -0
- package/templates/claude/WIDGETS.md.ejs +531 -0
- package/templates/config/jest.config.js.ejs +19 -0
- package/templates/config/vitest.config.ts.ejs +13 -0
- package/templates/gitignore.ejs +4 -0
- package/templates/package.json.ejs +15 -0
- package/templates/src/app.tsx.ejs +17 -0
- package/templates/src/dev.tsx.ejs +5 -0
- package/templates/src/index.tsx.ejs +4 -0
- package/templates/tests/app.test.tsx.ejs +27 -0
- package/templates/tsconfig.json.ejs +14 -0
package/bin/gtkx.js
ADDED
package/dist/cli.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
import "./refresh-runtime.js";
|
package/dist/cli.js
CHANGED
package/dist/create.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported package managers for GTKX projects.
|
|
3
|
+
*/
|
|
1
4
|
export type PackageManager = "pnpm" | "npm" | "yarn" | "bun";
|
|
5
|
+
/**
|
|
6
|
+
* Supported testing frameworks for GTKX projects.
|
|
7
|
+
*/
|
|
2
8
|
export type TestingFramework = "vitest" | "jest" | "node" | "none";
|
|
9
|
+
/**
|
|
10
|
+
* Options for creating a new GTKX project.
|
|
11
|
+
*
|
|
12
|
+
* All options are optional; missing values will be prompted interactively.
|
|
13
|
+
*/
|
|
3
14
|
export type CreateOptions = {
|
|
4
15
|
name?: string;
|
|
5
16
|
appId?: string;
|
|
@@ -7,16 +18,36 @@ export type CreateOptions = {
|
|
|
7
18
|
testing?: TestingFramework;
|
|
8
19
|
claudeSkills?: boolean;
|
|
9
20
|
};
|
|
10
|
-
export declare const getTestScript: (testing: TestingFramework) => string | undefined;
|
|
11
|
-
export declare const generatePackageJson: (name: string, appId: string, testing: TestingFramework) => string;
|
|
12
|
-
export declare const generateTsConfig: () => string;
|
|
13
21
|
export declare const getAddCommand: (pm: PackageManager, deps: string[], dev: boolean) => string;
|
|
14
22
|
export declare const getRunCommand: (pm: PackageManager) => string;
|
|
15
23
|
export declare const isValidProjectName: (name: string) => boolean;
|
|
16
24
|
export declare const isValidAppId: (appId: string) => boolean;
|
|
17
25
|
/**
|
|
18
|
-
* Creates a new GTKX
|
|
19
|
-
*
|
|
20
|
-
*
|
|
26
|
+
* Creates a new GTKX project with interactive prompts.
|
|
27
|
+
*
|
|
28
|
+
* Scaffolds a complete project structure including:
|
|
29
|
+
* - TypeScript configuration
|
|
30
|
+
* - React component template
|
|
31
|
+
* - Development server entry point
|
|
32
|
+
* - Optional testing setup
|
|
33
|
+
* - Optional Claude Code skills
|
|
34
|
+
*
|
|
35
|
+
* @param options - Pre-filled options to skip prompts
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* import { createApp } from "@gtkx/cli";
|
|
40
|
+
*
|
|
41
|
+
* // Interactive mode
|
|
42
|
+
* await createApp();
|
|
43
|
+
*
|
|
44
|
+
* // With pre-filled options
|
|
45
|
+
* await createApp({
|
|
46
|
+
* name: "my-app",
|
|
47
|
+
* appId: "com.example.myapp",
|
|
48
|
+
* packageManager: "pnpm",
|
|
49
|
+
* testing: "vitest",
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
21
52
|
*/
|
|
22
53
|
export declare const createApp: (options?: CreateOptions) => Promise<void>;
|