2.0.3 • Published 6 years ago
vue-comp-generator v2.0.3
vue-comp-generator
CLI utility function for creating Vue.js templates.
Installation
$ npm install -g vue-comp-generator
Basic Generation
Run the following command to receive terminal instructions
$ vuegc
Quick Generation
Run the following command to bypass the terminal instructions
$ vuegc mycomp
File Scaffolding
Use the - sign to delineate between the folder and files naming conventions. The result will be the following scaffolding:
$ vuegc route-home
route-home
home.js
home.scss
home.vue
Mac Template
Feel free to change the generated templates which are located here.
- /usr/local/lib/node_modules/vue-comp-generator/
Windows Template
Feel free to change the generated templates which are located here.
- C:\Users{{localuser}}\AppData\Roaming\npm\node_modules\vue-comp-generator\template
Generated Templates
Example
$ vuegc home
Will create the following three files:
home.js
export default {
data () {
return {
}
},
methods: {
},
components: {
}
}
home.scss
section {
}
home.vue
<style src="./home.scss" type="text/scss" lang="scss" scoped></style>
<script src="./home.js" type="text/javascript"></script>
<template>
<section>
<main>
</main>
</section>
</template>