create-laju-app 1.0.4 → 1.0.5

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 +13 -6
  2. package/package.json +3 -4
package/bin/cli.js CHANGED
@@ -5,6 +5,7 @@ const prompts = require('prompts');
5
5
  const degit = require('degit');
6
6
  const path = require('path');
7
7
  const fs = require('fs');
8
+ const { execSync } = require('child_process');
8
9
 
9
10
  program
10
11
  .name('create-laju-app')
@@ -58,13 +59,19 @@ program
58
59
  JSON.stringify(packageJson, null, 2)
59
60
  );
60
61
 
61
- console.log('✅ Project created successfully!');
62
+ // Change directory and run setup commands
63
+ process.chdir(targetPath);
64
+ console.log('📦 Installing dependencies...');
65
+ execSync('npm install', { stdio: 'inherit' });
66
+ console.log('📝 Copying environment file...');
67
+ execSync('cp .env.example .env', { stdio: 'inherit' });
68
+ console.log('🔄 Running migrations...');
69
+ execSync('npx knex migrate:latest', { stdio: 'inherit' });
70
+ console.log('🎉 Project created successfully!');
62
71
  console.log('');
63
- console.log('To get started:');
64
- console.log(` cd ${projectDirectory}`);
65
- console.log(' npm install');
66
- console.log(' npm run dev');
67
-
72
+ console.log('🚀 Your project is ready! You can now start developing.');
73
+ console.log('🔥 npm run dev to start the development server.');
74
+ console.log('📦 npm run build to build the production files.');
68
75
  } catch (error) {
69
76
  console.error('Error:', error.message);
70
77
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-laju-app",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "keywords": [
5
5
  "laju",
6
6
  "svelte",
@@ -15,6 +15,7 @@
15
15
  "create-laju-app": "./bin/cli.js"
16
16
  },
17
17
  "dependencies": {
18
+ "child_process": "^1.0.2",
18
19
  "commander": "^11.0.0",
19
20
  "degit": "^2.8.4",
20
21
  "prompts": "^2.4.2"
@@ -24,6 +25,4 @@
24
25
  "type": "git",
25
26
  "url": "git+https://github.com/maulanashalihin/laju.git"
26
27
  }
27
-
28
-
29
- }
28
+ }