增加容错

This commit is contained in:
dengtongyu committed 2018-11-19 10:12:08 +08:00
1 parent 3c07f2fd30
commit 48b6ab18f0
1 file changed
+5
+5
View File
@@ -12,6 +12,11 @@ let _paths = {};
let _configJson = {}; let _configJson = {};
exports.init = (type, paths, command) => { exports.init = (type, paths, command) => {
if(type != 'react') {
console.error(chalk.bold.red('暂不支持该类型模板!'));
return;
}
_paths = paths; _paths = paths;
let tplPath = path.join(_paths.rootPath, util.tplTypePath(type)); let tplPath = path.join(_paths.rootPath, util.tplTypePath(type));