H5W3
当前位置:H5W3 > 其他技术问题 > 正文

还在为写.vue文件烦恼吗?快来用dot-vue-cli交互式生成吧!

dot-vue-cli

Vue2.x single file component .vue generator.

features

  1. Set name, props, data, computed, watch and choose lifecycles, methods by interactive command line.
  2. Import vuex, mapState, mapMutations, mapActions by interactive command line.

install

npm install -g dot-vue-cli

usage

dot-vue

Type dot-vue in terminal and follow the instructions.

process

1.generate template configs
{
filename: "foo",
name: "foo",
data: true,
"data details": "a,b,c",
computed: true,
"computed details": "a,b,c",
watch: true,
"watch details": "a,b,c",
methods: true,
"methods details": "a,b,c",
"vue lifecycle hooks": ["mounted", "destroyed"],
"vuex helpers": ["mapState", "mapMutations", "mapActions"],
};
2.generate target .vue file based on template literals

还在为写.vue文件烦恼吗?快来用dot-vue-cli交互式生成吧!
还在为写.vue文件烦恼吗?快来用dot-vue-cli交互式生成吧!

Enjoy it !

未经允许不得转载:H5W3 » 还在为写.vue文件烦恼吗?快来用dot-vue-cli交互式生成吧!

赞 (0)

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址