Skip to content
This repository has been archived by the owner on Apr 27, 2020. It is now read-only.

A simple python script that create/generate a new VueJs component and adds it to the components list

License

Notifications You must be signed in to change notification settings

regi18/vuejs-generate-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Easily generates new components in a Vue.js project

Just execute the script with vue-generate.py <component name> to generate a new component, please write the component's name in PascalCase (the tag will be automatically converted to kebab-case). (The script should be executed in the project's root folder)

What it does:

  1. It creates a new .vue file (named as you typed)
  2. It adds the newly created component to the App.vue file
  3. Now you're ready to use your new component!
P.S.: For faster use, for example, you could rename the script to something shorter, like vue-g.py.

How to customize

If you want to change the generated component all you need to do is change the component_template string,

Example

For example, you if launch the script as vue-generate.py HelloVue, it will create a new file called HelloVue.vue and import it in the App.vue file. Now you can use the component as <HelloVue></HelloVue> or <hello-vue></hello-vue>


Contributors

regi18

License

This project is licensed under the MIT License - see the LICENSE file for details

License: GPL v3

Releases

No releases published

Packages

No packages published

Languages