https://github.com/ashetm/npm-vue-cli-plugin-component-generator
https://github.com/ashetm/npm-vue-cli-plugin-component-generator
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/ashetm/npm-vue-cli-plugin-component-generator
- Owner: AsheTM
- Created: 2021-06-25T22:09:07.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-25T22:18:43.000Z (about 5 years ago)
- Last Synced: 2025-05-13T20:33:06.874Z (about 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Vue Component Generator (Javascript & Typescript)
[vue-cli 3](https://github.com/vuejs/vue-cli) plugin to generate vue components
This package will works with typescript and create vue components easily using vue cli.
## Installation
- Install via npm
```sh
$ npm i @ashetm/vue-cli-plugin-component-generator
```
- Install via vue-cli
```sh
$ vue add @ashetm/vue-cli-plugin-component-generator
```
## Usage
- Invoke to generate a new components:
```sh
$ vue invoke @ashetm/vue-cli-plugin-component-generator
```
This will prompt to following questions.
```sh
? Where's your components's root directory?
```
By default this will give ./src/components path. But you can decide and type the path you want to generate the component.
```sh
? What's your component name?
```
Here componet name can be defined.
Now it will generate 4 files in the defined directory inside a folder with file name.
file-name.html
file-name.vue
file-name.scss or file-name.sass or file-name.css
file-name.js or file-name.ts