create-laju-app 1.0.11 → 1.0.12

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/cli.js +14 -0
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -68,6 +68,20 @@ program
68
68
  execSync(process.platform === 'win32' ? 'copy .env.example .env' : 'cp .env.example .env', { stdio: 'inherit' });
69
69
  console.log('🔄 Running migrations...');
70
70
  execSync('npx knex migrate:latest', { stdio: 'inherit' });
71
+ // Update scripts in package.json for Windows
72
+ if (process.platform === 'win32') {
73
+ packageJson.scripts = {
74
+ "dev": "cls && npx concurrently \"vite\" \"npx nodemon\"",
75
+ "build": "if exist build rmdir /s /q build && vite build && tsc && xcopy /s /e /i dist build && xcopy /s /e /i public build"
76
+ };
77
+
78
+ // Write updated package.json
79
+ fs.writeFileSync(
80
+ packageJsonPath,
81
+ JSON.stringify(packageJson, null, 2)
82
+ );
83
+ }
84
+
71
85
  console.log('🎉 Project created successfully!');
72
86
  console.log('');
73
87
  console.log('🚀 Your project is ready! You can now start developing.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-laju-app",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "keywords": [
5
5
  "laju",
6
6
  "svelte",