this.gui 1.1.22 → 1.1.24

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.
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env node
2
1
  /**
3
2
  * This.GUI CLI (TypeScript)
4
3
  *
@@ -19,7 +18,7 @@ const __dirname = path.dirname(__filename);
19
18
  const appName = process.argv[2] || 'my-app';
20
19
  const templateDir = path.resolve(__dirname, '../templates');
21
20
  const targetDir = path.resolve(process.cwd(), appName);
22
- console.log(`\n🧩 Creating This.GUI project: ${appName}\n`);
21
+ console.log(`\n🧩 Creating .GUI project: ${appName}\n`);
23
22
  try {
24
23
  copySync(templateDir, targetDir);
25
24
  console.log(`📁 Project files copied to ${targetDir}`);
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ var child_process = require('child_process');
5
+ var fsExtra = require('fs-extra');
6
+ var path = require('path');
7
+ var url = require('url');
8
+
9
+ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
10
+ /**
11
+ * This.GUI CLI (TypeScript)
12
+ *
13
+ * Initializes a new This.GUI project using:
14
+ *
15
+ * npx thisgui my-app
16
+ *
17
+ * Compiles to dist/bin/cli.js when the package is built.
18
+ */
19
+
20
+ const { copySync } = fsExtra;
21
+ const __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
22
+ const __dirname$1 = path.dirname(__filename$1);
23
+ const appName = process.argv[2] || 'my-app';
24
+ const templateDir = path.resolve(__dirname$1, '../templates');
25
+ const targetDir = path.resolve(process.cwd(), appName);
26
+ console.log(`\n🧩 Creating .GUI project: ${appName}\n`);
27
+ try {
28
+ copySync(templateDir, targetDir);
29
+ console.log(`📁 Project files copied to ${targetDir}`);
30
+ process.chdir(targetDir);
31
+ console.log(`📦 Installing dependencies...\n`);
32
+ child_process.execSync('npm install', { stdio: 'inherit' });
33
+ console.log(`\n✅ Done!\n`);
34
+ console.log(`Next steps:\n cd ${appName}\n npm run storybook\n`);
35
+ } catch (error) {
36
+ console.error('❌ Error creating project:', error);
37
+ process.exit(1);
38
+ }