Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

[Enhancment] cli needs updating to support 3rd-party NPM Quasar packages #205

Open
hawkeye64 opened this issue Nov 21, 2018 · 4 comments
Open

Comments

@hawkeye64
Copy link
Member

hawkeye64 commented Nov 21, 2018

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
This would add QPopover and QSlideTransition to the framework: { components: [ section, if they were not already there.

quasar conf directives CloseOverlay
This would add the CloseOverlay to the directives: [ section, if not already there.

You get the general idea.

@rstoenescu
Copy link
Member

Hi,

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.

@smolinari
Copy link
Contributor

smolinari commented Nov 23, 2018

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 yarn install some-great-new-plugin and they are off to the races. 😃

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. 😜

Scott

@hawkeye64
Copy link
Member Author

@smolinari Scott, I think some documentation for people making 3rd-party plugins for Quasar would be great and very instructive.

@smolinari
Copy link
Contributor

That's just it. I don't believe there is the ability for the installation of 3rd party (made for Quasar) plugins in Quasar yet (at least not to my knowledge, which isn't the greatest, I'll admit).

Scott

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants