Closed patrickcate closed 6 years ago
Hey Patrick,
I know about Vue CLI 3, but I don't know about plugins, or how this could be made into a plugin!
Can you give me the lowdown?
What would the plugin do?
Hi Dave,
Vue CLI 3 allows for third-party functionality to be added to a Vue CLI project via the vue add
command or via the new UI launched from the vue ui
command.
Here are the docs for cli plugin authors: https://cli.vuejs.org/dev-guide/plugin-dev.html https://cli.vuejs.org/dev-guide/ui-info.html https://cli.vuejs.org/dev-guide/ui-api.html
The UI mode is particularly cool because it can provide a configuration page where users can easily select any options available for the plugin. I could see this being very useful for choosing the Vuex Pathify schema config.
If you install the latest version of Vue CLI 3, in UI mode the ESLint plugin provides a great example of this.
But these are plugins for cli processes, no?
Vue CLI plugins aren't limited to just that. Through generators they can add libraries, add/change files, setup configuration, etc.
Here are some examples of third-card plugins:
Hmmm. I think it's pretty easy to write a bit of config!
I'm actually going to look again at the options stuff, hopefully I can make the import / export bit easier.
I'd love to see this available as a Vue CLI 3 plugin. Are there any plans for this?