1.2.0 • Published 7 years ago
vue-template-generator v1.2.0
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-generatorLocal Package
npm install --save-dev vue-template-generatorCall 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 helpWill give you the help commands.
Scaffolding
vgc scaffold exampleWill generate a vue file: index, create, update, and edit.
index/edit/update/create.vue
<template>
</template>
<script>
export default {
name: 'ExampleIndex',
data() {
return {
}
},
created() {
},
};
</script>
<style lang="scss" scoped>
</style>Generating a single component
vgc component example src/componentWill generate a file named example.vue, in src/component.
example.vue
<template>
</template>
<script>
export default {
name: 'ExampleIndex',
data() {
return {
}
},
created() {
},
};
</script>
<style lang="scss" scoped>
</style>