davestewart / vuex-pathify

Vue / Vuex plugin providing a unified path syntax to Vuex stores
https://davestewart.github.io/vuex-pathify
MIT License
1.37k stars 57 forks source link

Vue CLI 3 Plugin? #17

Closed patrickcate closed 6 years ago

patrickcate commented 6 years ago

I'd love to see this available as a Vue CLI 3 plugin. Are there any plans for this?

davestewart commented 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?

patrickcate commented 6 years ago

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.

screen shot 2018-06-16 at 7 47 59 am

davestewart commented 6 years ago

But these are plugins for cli processes, no?

patrickcate commented 6 years ago

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:

  1. https://github.com/vuetifyjs/vue-cli-plugin-vuetify
  2. https://github.com/Akryum/vue-cli-plugin-apollo
  3. https://github.com/Seb-L/vue-cli-plugin-element-ui
  4. https://github.com/vuetifyjs/vue-cli-plugin-vuetify
  5. https://github.com/quasarframework/vue-cli-plugin-quasar
  6. https://github.com/komushi/vue-cli-plugin-appsync
  7. https://github.com/paulgv/vue-cli-plugin-vuex-module-generator
  8. https://github.com/raphaelcockx/vue-cli-plugin-meta
davestewart commented 6 years ago

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.