khushikumarigupta14-express-generator-cli 1.0.0 → 1.0.3
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/lib/commands/init.js +6 -0
- package/package.json +2 -2
package/lib/commands/init.js
CHANGED
|
@@ -34,6 +34,12 @@ export const initProject = (projectName) => {
|
|
|
34
34
|
// Remove .git folder to detach from boilerplate history
|
|
35
35
|
fs.removeSync(path.join(projectName, '.git'));
|
|
36
36
|
|
|
37
|
+
// Cleanup: Remove the CLI tool source if it was cloned with the boilerplate
|
|
38
|
+
const cliPath = path.join(projectName, 'express-generator-cli');
|
|
39
|
+
if (fs.existsSync(cliPath)) {
|
|
40
|
+
fs.removeSync(cliPath);
|
|
41
|
+
}
|
|
42
|
+
|
|
37
43
|
// Initialize new git repo
|
|
38
44
|
shell.cd(projectName);
|
|
39
45
|
shell.exec('git init');
|
package/package.json
CHANGED