Add enable/disable command for plugins
Add following feature:
patternlab enable --plugins=plugin-name1, plugin-name2
patternlab disable --plugins=plugin-name1, plugin-name2
@bmuenzenmeyer Is this a viable feature and par with any core functionality?
yes,
as long as by enable and disable, you setting the value inside patternlab-config.json per guidance in the example here: https://github.com/pattern-lab/plugin-node-tab#configuration
this is how plugins will work in 3.X
Cool. I will implement it as per spec. Thanks
Just had a second look at it … isn't it a bit verbose to just expose plugin-related logic on the config?
This way either the plugin itself has to (a) return its default configuration or (b) the CLI has to map that somehow or (c) the user has to manually add it to the PL config
I prefer (a) … as this unties the CLI and user from knowing the exact config. Also if different plugins or plugin versions require diff config this would be the easiest way to make sure having a non-breaking setup.
Actually: The more I think about this the more I feel we should handle it like babel—let the user enable/config plugins. I am closing this for now