this.gui 1.2.15 → 1.2.17
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/cli.ts +53 -0
- package/dist/bin/cli.d.ts +10 -0
- package/dist/bin/cli.js +43 -30
- package/dist/{this.gui.umd.js → this-gui.umd.js} +17 -17
- package/package.json +4 -4
- package/templates/index.html +13 -0
- package/templates/package.json +29 -0
- package/templates/vite.config.ts +11 -0
- package/tsconfig.cli.json +9 -0
- package/bin/cli.cjs +0 -30
- /package/dist/{this.gui.es.js → this-gui.es.js} +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "this.gui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.17",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/this-gui.umd.js",
|
|
7
7
|
"module": "dist/this-gui.es.js",
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"bin": {
|
|
17
|
-
"gui": "./dist/bin/cli.
|
|
17
|
+
"gui": "./dist/bin/cli.js"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
|
-
"build": "vite build &&
|
|
21
|
-
"
|
|
20
|
+
"build": "vite build && npm run build:cli",
|
|
21
|
+
"build:cli": "tsc --project tsconfig.cli.json",
|
|
22
22
|
"dev": "vite",
|
|
23
23
|
"dev:lib": "vite build --watch",
|
|
24
24
|
"preview": "vite preview",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><circle cx='32' cy='32' r='32' fill='%23006688'/><text x='50%' y='54%' text-anchor='middle' font-size='28' font-family='sans-serif' fill='white'>GUI</text></svg>" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>This.GUI Demo</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "thisgui-demo",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc --noEmit && vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"storybook": "storybook dev -p 6006",
|
|
11
|
+
"build-storybook": "storybook build"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"react": "^19.1.1",
|
|
15
|
+
"react-dom": "^19.1.1",
|
|
16
|
+
"react-router-dom": "^6.30.1",
|
|
17
|
+
"this.gui": "latest"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@storybook/addon-essentials": "^9.1.4",
|
|
21
|
+
"@storybook/react-vite": "^9.1.4",
|
|
22
|
+
"@types/react": "^19.0.0",
|
|
23
|
+
"@types/react-dom": "^19.0.0",
|
|
24
|
+
"@vitejs/plugin-react": "^5.0.0",
|
|
25
|
+
"storybook": "^9.1.4",
|
|
26
|
+
"typescript": "^5.9.0",
|
|
27
|
+
"vite": "^6.0.0"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/bin/cli.cjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* This.GUI CLI (TypeScript)
|
|
4
|
-
*
|
|
5
|
-
* Initializes a new This.GUI project using:
|
|
6
|
-
*
|
|
7
|
-
* npx thisgui my-app
|
|
8
|
-
*
|
|
9
|
-
* Compiles to dist/bin/cli.js when the package is built.
|
|
10
|
-
*/
|
|
11
|
-
const { execSync } = require('child_process');
|
|
12
|
-
const fsExtra = require('fs-extra');
|
|
13
|
-
const { copySync } = fsExtra;
|
|
14
|
-
const path = require('path');
|
|
15
|
-
const appName = process.argv[2] || 'my-app';
|
|
16
|
-
const templateDir = path.resolve(__dirname, '../templates');
|
|
17
|
-
const targetDir = path.resolve(process.cwd(), appName);
|
|
18
|
-
console.log(`\n🧩 Creating .GUI project: ${appName}\n`);
|
|
19
|
-
try {
|
|
20
|
-
copySync(templateDir, targetDir);
|
|
21
|
-
console.log(`📁 Project files copied to ${targetDir}`);
|
|
22
|
-
process.chdir(targetDir);
|
|
23
|
-
console.log(`📦 Installing dependencies...\n`);
|
|
24
|
-
execSync('npm install', { stdio: 'inherit' });
|
|
25
|
-
console.log(`\n✅ Done!\n`);
|
|
26
|
-
console.log(`Next steps:\n cd ${appName}\n npm run storybook\n`);
|
|
27
|
-
} catch (error) {
|
|
28
|
-
console.error('❌ Error creating project:', error);
|
|
29
|
-
process.exit(1);
|
|
30
|
-
}
|
|
File without changes
|