Vue js component generator
CLI util for easy generate Vue js component
Installation
npm install -g vue-generate-component-typescript
Usage
vgc --help
Create new component
vgc footer
Will generate five files:
footer.component.js
;; @ { console; }
footer.component.html
footer Component
footer.component.scss
index.vue
Create new component single file
vgc -s home
will generate one vue file:
<template> <div class="home"> <h1>home Component</h1> </div></template> <script lang="ts">;; @ { console; } </script> <style scoped lang="scss"> home </style>
Create new directive
vgc -d test
will generate:
test.directive.ts
; const TestDirective { } // When the bound element is inserted into the DOM... { // el.focus(); } { } { }; // You can also make it available globally.Vue;
Create new Pipe (filter)
vgc -p test
will generate:
test.pipe.ts
; const Test = { return value;}; Vue;