If you are working on an awesome vue project, give this awesome vue-cli-pod-plugin a spin.
- Create your components and its related files in a snap
- Set file path guidelines
- Enforce conventions and rules via default template file content
- Customise and extend the pod configurations
Add the plugin to your vue project using the below command:
vue add pod
To know more about vue cli plugins click here.
Now your project has access to the following pod commands. The tasks can be triggered using yarn or npm.
npm run <command> <file type> <file name or file path>
The pod CLI plugin allows component, directive and mixin as the default file type. It can also be extended.
The generate command creates files of a given type using the config.
npm run generate component UI/dropdown
By default, the vue-pod plugin will use the default configuration to generate files in the pod structure. It can be overridden by customising the configs using the below config command.
The config command creates the
pod.config.js file to the root of your vue project with the default settings. The file can be customised and it will be used by pod cli for further invocations.
npm run config
Click here to check the available configuration options.
The rename command replaces the generated files with an alternative name.
npm run rename component UI/Dropdown UI/Selectbox
The delete command removes the generated files in the specified path and deletes the directories from the project if it's empty.
npm run delete component UI/Dropdown UI/Selectbox
Vue is incrementally adoptable and it lets you include scalable features like routes, stores(vuex) to your project later. Don't worry! like vue, vue-cli-plugin-pod is also extensible.
Introduce new file types and their file path in the config at ease.
If you like the plugin, donate a star to the repo 🤩
Extended cli to manage file templates for vue projects
Add this vue cli plugin to your awesome vue project using the below command:
vue add pod
once installed, your project will have access to the following tasks:
Creates template files for the specified file type
npm run generate <filetype> <file name or path>
npm run generate component UI/Button
Renames template files for the specified file type
npm run rename <filetype> <old file name or path> <new file name or path>
npm run rename component icon avatar
Deletes template files for the specified file type
npm run delete <filetype> <file name or path>
npm run delete component UI/Button
Get a clone of the default pod config file and customize it.
npm run config
The above command will generate a
pod.config.js file to the root of your project.
click here to…