patternlab-node-cli icon indicating copy to clipboard operation
patternlab-node-cli copied to clipboard

Add enable/disable command for plugins

Open raphaelokon opened this issue 8 years ago • 5 comments

Add following feature:

patternlab enable --plugins=plugin-name1, plugin-name2 patternlab disable --plugins=plugin-name1, plugin-name2

raphaelokon avatar Mar 27 '17 15:03 raphaelokon

@bmuenzenmeyer Is this a viable feature and par with any core functionality?

raphaelokon avatar Oct 11 '17 19:10 raphaelokon

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

bmuenzenmeyer avatar Oct 11 '17 19:10 bmuenzenmeyer

Cool. I will implement it as per spec. Thanks

raphaelokon avatar Oct 11 '17 19:10 raphaelokon

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.

raphaelokon avatar Oct 12 '17 08:10 raphaelokon

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

raphaelokon avatar Oct 12 '17 08:10 raphaelokon