create-server-nodejs 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/package.json +1 -1
- package/packages/index.js +16 -0
package/package.json
CHANGED
package/packages/index.js
CHANGED
|
@@ -126,6 +126,22 @@ Object.keys(files).forEach(fileName => {
|
|
|
126
126
|
console.log(chalk.green(`File created: ${fileName}`));
|
|
127
127
|
});
|
|
128
128
|
|
|
129
|
+
// ==================== npm install ====================
|
|
130
|
+
|
|
131
|
+
console.log(chalk.yellow('\nš¦ Installing dependencies... (This may take a while)'));
|
|
132
|
+
try {
|
|
133
|
+
execSync('npm install', {
|
|
134
|
+
cwd: targetDir,
|
|
135
|
+
stdio: 'inherit'
|
|
136
|
+
});
|
|
137
|
+
console.log(chalk.green('ā
Dependencies installed successfully!'));
|
|
138
|
+
} catch (error) {
|
|
139
|
+
console.log(chalk.red('ā Error during npm install:'));
|
|
140
|
+
console.error(error.message);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// ============================================================
|
|
144
|
+
|
|
129
145
|
console.log(chalk.bold.green('\n Project created successfully!'));
|
|
130
146
|
console.log(chalk.cyan(`\n cd ${projectName}`));
|
|
131
147
|
console.log(chalk.cyan(` npm install`));
|