@fastcar/cli 0.0.3 → 0.0.4
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/src/init.js +2 -6
package/package.json
CHANGED
package/src/init.js
CHANGED
|
@@ -176,11 +176,6 @@ async function init(args = ["web"]) {
|
|
|
176
176
|
//复制至项目文件下
|
|
177
177
|
utils.copyDirectory(templateDir, currDir);
|
|
178
178
|
|
|
179
|
-
//解压node_modules
|
|
180
|
-
// console.log("unzip node_modules");
|
|
181
|
-
// let nodeModulesPath = path.join(currDir, "node_modules.zip");
|
|
182
|
-
// await utils.unzipFile(nodeModulesPath, currDir);
|
|
183
|
-
|
|
184
179
|
//合并package.json文件
|
|
185
180
|
let templatePackagePath = path.join(templateDir, "package.json");
|
|
186
181
|
if (fs.existsSync(templatePackagePath)) {
|
|
@@ -255,8 +250,8 @@ async function init(args = ["web"]) {
|
|
|
255
250
|
|
|
256
251
|
//更改配置的文件名
|
|
257
252
|
let projectName = packageInfo.name;
|
|
258
|
-
|
|
259
253
|
let pm2RunPath = path.join(currDir, "ecosystem.config.yml");
|
|
254
|
+
|
|
260
255
|
if (fs.existsSync(pm2RunPath)) {
|
|
261
256
|
let pm2Config = utils.readYaml(pm2RunPath);
|
|
262
257
|
pm2Config.apps.name = projectName;
|
|
@@ -266,6 +261,7 @@ async function init(args = ["web"]) {
|
|
|
266
261
|
console.log("clean files");
|
|
267
262
|
setTimeout(() => {
|
|
268
263
|
utils.delDirEctory(templateDir);
|
|
264
|
+
console.log("Please execute npm install before starting");
|
|
269
265
|
}, 1000);
|
|
270
266
|
}
|
|
271
267
|
}
|