lovelope-react-cli
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -8,2 +8,4 @@ const fs = require('fs-extra'); | ||
const shelljs = require('shelljs'); | ||
const config = require('../config'); | ||
@@ -16,2 +18,3 @@ const getQuestions = require('./questions'); | ||
// eslint-disable-next-line no-unused-vars | ||
function assert(v) { | ||
@@ -29,6 +32,6 @@ console.dir(v); | ||
.then(answers => { | ||
const projectType = program.typescript ? 'ts' : 'default'; | ||
// 项目配置 | ||
const meta = { | ||
name, | ||
projectType: program.typescript ? 'ts' : 'default', | ||
...answers, | ||
@@ -38,3 +41,3 @@ }; | ||
// git仓库分支 | ||
const branch = gitBranchs[meta.projectType]; | ||
const branch = gitBranchs[projectType]; | ||
@@ -52,3 +55,3 @@ // 开始下载动画 | ||
}) | ||
.then(() => { | ||
.then(async () => { | ||
// 下载成功调用 | ||
@@ -63,2 +66,3 @@ spinner.succeed(); | ||
} | ||
shelljs.rm('-rf', `${name}/.git`); | ||
console.log(symbols.success, chalk.green('项目初始化完成')); | ||
@@ -65,0 +69,0 @@ }) |
{ | ||
"name": "lovelope-react-cli", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "A cli for react-starter.", | ||
@@ -69,4 +69,5 @@ "bin": { | ||
"semver": "^5.6.0", | ||
"shelljs": "^0.8.3", | ||
"validate-npm-package-name": "^3.0.0" | ||
} | ||
} |
8698
166
11
+ Addedshelljs@^0.8.3
+ Addedfunction-bind@1.1.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedinterpret@1.4.0(transitive)
+ Addedis-core-module@2.13.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedrechoir@0.6.2(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedshelljs@0.8.5(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)