diff --git a/package.json b/package.json
index 19b00aa8..c4fb285e 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,8 @@
"lint": "eslint --ext .js,.vue src",
"test": "npm run lint",
"test:unit": "vue-cli-service test:unit",
- "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
+ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
+ "new": "plop"
},
"husky": {
"hooks": {
@@ -87,6 +88,7 @@
"lint-staged": "7.2.2",
"mockjs": "1.0.1-beta3",
"node-sass": "^4.9.0",
+ "plop": "2.3.0",
"runjs": "^4.3.2",
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs
new file mode 100644
index 00000000..76610552
--- /dev/null
+++ b/plop-templates/component/index.hbs
@@ -0,0 +1,26 @@
+{{#if template}}
+
+
+
+{{/if}}
+
+{{#if script}}
+
+{{/if}}
+
+{{#if style}}
+
+{{/if}}
diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js
new file mode 100644
index 00000000..3723e8e1
--- /dev/null
+++ b/plop-templates/component/prompt.js
@@ -0,0 +1,55 @@
+const { notEmpty } = require('../utils.js')
+
+module.exports = {
+ description: 'generate vue component',
+ prompts: [{
+ type: 'input',
+ name: 'name',
+ message: 'component name please',
+ validate: notEmpty('name')
+ },
+ {
+ type: 'checkbox',
+ name: 'blocks',
+ message: 'Blocks:',
+ choices: [{
+ name: '',
+ value: 'template',
+ checked: true
+ },
+ {
+ name: '
+{{/if}}
+
+{{#if style}}
+
+{{/if}}
diff --git a/plop-templates/view/prompt.js b/plop-templates/view/prompt.js
new file mode 100644
index 00000000..1d490ee8
--- /dev/null
+++ b/plop-templates/view/prompt.js
@@ -0,0 +1,55 @@
+const { notEmpty } = require('../utils.js')
+
+module.exports = {
+ description: 'generate a view',
+ prompts: [{
+ type: 'input',
+ name: 'name',
+ message: 'view name please',
+ validate: notEmpty('name')
+ },
+ {
+ type: 'checkbox',
+ name: 'blocks',
+ message: 'Blocks:',
+ choices: [{
+ name: '',
+ value: 'template',
+ checked: true
+ },
+ {
+ name: '