create-vista-app 0.0.3 → 0.0.4

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.
Files changed (2) hide show
  1. package/bin/vista.js +10 -2
  2. package/package.json +1 -1
package/bin/vista.js CHANGED
@@ -18,8 +18,16 @@ import { vistaPlugin } from 'vista-core-js/plugin';
18
18
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
19
19
 
20
20
  const args = process.argv.slice(2);
21
- const command = args[0] || 'dev';
22
- const targetDirArg = args[1]; // Removed default '.' to rely on prompt if creating
21
+ let command = args[0];
22
+ let targetDirArg = args[1];
23
+
24
+ const knownCommands = ['dev', 'build', 'start', 'create'];
25
+ if (!command) {
26
+ command = 'create';
27
+ } else if (!knownCommands.includes(command)) {
28
+ targetDirArg = command;
29
+ command = 'create';
30
+ }
23
31
 
24
32
  // Helper: Find all CSS files in app directory
25
33
  function findCssFiles(dir, fileList = []) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vista-app",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "vista": "./bin/vista.js"