create-luff-app 1.0.0 → 1.0.1
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.js +13 -3
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -35,12 +35,22 @@ async function main() {
|
|
|
35
35
|
// Delete the CLI tool itself from the downloaded project
|
|
36
36
|
fs.rmSync(path.join(projectPath, 'cli'), { recursive: true, force: true });
|
|
37
37
|
|
|
38
|
-
console.log('\x1b[36m%s\x1b[0m', '
|
|
39
|
-
|
|
38
|
+
console.log('\x1b[36m%s\x1b[0m', '📝 Updating package.json...');
|
|
39
|
+
const packageJsonPath = path.join(projectPath, 'package.json');
|
|
40
|
+
const packageJson = require(packageJsonPath);
|
|
41
|
+
packageJson.name = projectName;
|
|
42
|
+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
40
43
|
|
|
41
|
-
console.log('\x1b[36m%s\x1b[0m', '
|
|
44
|
+
console.log('\x1b[36m%s\x1b[0m', '🌱 Initializing new Git repository...');
|
|
45
|
+
execSync('git init -b main', { stdio: 'inherit' });
|
|
46
|
+
|
|
47
|
+
console.log('\x1b[36m%s\x1b[0m', '⚙️ Setting up environment variables & installing dependencies...');
|
|
42
48
|
execSync('bash scripts/setup.sh', { stdio: 'inherit' });
|
|
43
49
|
|
|
50
|
+
console.log('\x1b[36m%s\x1b[0m', '💾 Committing initial project state...');
|
|
51
|
+
execSync('git add .', { stdio: 'inherit' });
|
|
52
|
+
execSync('git commit -m "chore: initial commit from create-luff-app" --no-verify', { stdio: 'inherit' });
|
|
53
|
+
|
|
44
54
|
console.log('\x1b[32m%s\x1b[0m', '✅ Installation Complete!');
|
|
45
55
|
console.log('');
|
|
46
56
|
console.log('Inside that directory, you can run several commands:');
|