Skip to content

Commit

Permalink
feat(devtool): create template logic
Browse files Browse the repository at this point in the history
  • Loading branch information
cpselvis committed Jan 16, 2020
1 parent 7557299 commit 41afeeb
Show file tree
Hide file tree
Showing 36 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion packages/feflow-plugin-devtool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
},
"files": [
"src",
"lib"
"lib",
"templates"
],
"repository": {
"type": "git",
Expand All @@ -30,6 +31,7 @@
"@types/cross-spawn": "^6.0.0",
"@types/easy-table": "0.0.32",
"@types/figlet": "^1.2.0",
"@types/fs-extra": "^8.0.1",
"@types/inquirer": "^6.0.3",
"@types/js-yaml": "^3.12.1",
"@types/minimist": "^1.2.0",
Expand All @@ -56,6 +58,7 @@
"cross-spawn": "^6.0.5",
"easy-table": "^1.1.1",
"figlet": "^1.2.3",
"fs-extra": "^8.1.0",
"import-fresh": "^3.1.0",
"inquire": "^0.4.8",
"inquirer": "^6.5.0",
Expand Down
9 changes: 7 additions & 2 deletions packages/feflow-plugin-devtool/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import inquirer from 'inquirer';
import fs from 'fs-extra';
import path from 'path';

import chalk from 'chalk';

enum DEVTOOL_TYPE {
SCAFFLOAD = '脚手架',
Expand Down Expand Up @@ -72,7 +72,12 @@ module.exports = (ctx: any) => {
logger.info('Start creating %s', name);
const destinationPath = path.join(process.cwd(), name);
fs.copySync(templatePath, destinationPath);

logger.info('Creating success');
console.log();
console.log(chalk.cyan(' cd'), name);
console.log(` ${chalk.cyan('fef devtool dev')}`);
console.log();
console.log('Happy coding!');
break;
case 'dev':
console.log('dev');
Expand Down
Submodule feflow-plugin-example deleted from cc0509

0 comments on commit 41afeeb

Please sign in to comment.