@adriankulik/create-fullstack-app 1.0.1 → 1.1.0
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/cli/index.js +11 -0
- package/package.json +1 -1
package/cli/index.js
CHANGED
|
@@ -144,6 +144,17 @@ async function main() {
|
|
|
144
144
|
console.log(pc.yellow(' Could not set up Python virtual environment automatically. Please set it up manually.'));
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
// 7. Initialize Git repository
|
|
148
|
+
console.log(pc.blue('\nInitializing Git repository...'));
|
|
149
|
+
try {
|
|
150
|
+
execSync('git init', { cwd: targetDir, stdio: 'ignore' });
|
|
151
|
+
execSync('git add .', { cwd: targetDir, stdio: 'ignore' });
|
|
152
|
+
execSync('git commit -m "Initial commit from create-fullstack-app"', { cwd: targetDir, stdio: 'ignore' });
|
|
153
|
+
console.log(pc.cyan(' Git repository initialized.'));
|
|
154
|
+
} catch (e) {
|
|
155
|
+
console.log(pc.yellow(' Could not initialize Git repository automatically. You may need to run git init yourself.'));
|
|
156
|
+
}
|
|
157
|
+
|
|
147
158
|
console.log(pc.green(`\nSuccess! Created ${projectName} at ${targetDir}`));
|
|
148
159
|
console.log('\nInside that directory, you can run several commands:\n');
|
|
149
160
|
|
package/package.json
CHANGED