VueJS Component Template Generator
A simple CLI tool, used to generate VueJS components. (Compatiable with VueJS 2+)
Major credits to these guys!: Forked from this repo
Installation
Global
npm install -g vue-template-generator
Local Package
npm install --save-dev vue-template-generator
Call either by going through the directory, ./node_modules/vue-template-generator/dist/vgc.js
, or you can create a shortcut script through your own package.json
.
Usage
Help
vgc help
Will give you the help commands.
Scaffolding
vgc scaffold example
Will generate a vue file: index
, create
, update
, and edit
.
index/edit/update/create.vue
<template></template> <script> name: 'ExampleIndex' { return } { };</script> <style lang="scss" scoped></style>
Generating a single component
vgc component example src/component
Will generate a file named example.vue
, in src/component
.
example.vue
<template></template> <script> name: 'ExampleIndex' { return } { };</script> <style lang="scss" scoped></style>