1.2.0 • Published 5 years ago

vue-template-generator v1.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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>
export default {
  name: 'ExampleIndex',
  data() {
    return {
      
      }
  },
  created() {

  },
};
</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>
export default {
  name: 'ExampleIndex',
  data() {
    return {
      
      }
  },
  created() {

  },
};
</script>

<style lang="scss" scoped>
</style>

Credits