Join GitHub today
[Enhancment] cli needs updating to support 3rd-party NPM Quasar packages #205
If someone were to create and publish a Quasar package to NPM, then the person installing it would have to possibly manually add to the quasar.conf.js file.
I think that it would be great if the CLI could do some of that work. The postInstall of an NPM package would be perfect for this.
quasar conf component QPopover QSlideTransition
quasar conf directives CloseOverlay
You get the general idea.
First of all, really awesome article on the File Viewer!
Any external components/directives created for Quasar are esentially Vue components/directives, so they can be registered through the Vue API (Vue.use(...) in an app plugin) or imported and defined directly on a page/other component. My opinion is that having a mechanism to auto-inject external components/directives is just overkill. Will think about it more for Quasar CLI 1.0.
This goes a bit along the lines of the idea that a plugin in the plugin directory should warrant it being automatically added to Quasar, when Quasar loads (i.e. not needing to add an extra entry in quasar.conf.js).
That in turn would mean a flag in the plugin would need to be available to deem it active or not for troubleshooting.
The same would go for adding necessary components or directives, which the plugin requires. There should be config properties in the plugin for that. So, when Quasar loads its configuration, it needs to check the "active" plugins for configuration settings too and merge them with the ones already set by the project's developer(s).
This kind of setup for plugins would allow devland to create and define plugins without touching anything but their own code and allows the project dev to only need to install a plugin module, without extra steps in quasar.conf.js, to get new features added from plugins.
This would be 1000x better than writing articles on how to add axios, GraphQL, new components, new features, whatever, by devs, so other devs have to follow those instructions to get that functionality. Instead they'd just
Or put another way. I'd rather write an article about how to create a plugin in general and how to get it up into NPM for other devs to use, than write about how to create a specific plugin in Quasar, so it works.