studio-stomp / craft-twig-linter

A plugin for Craft CMS bringing `sserbin/twig-linter` to Craft CMS projects
MIT License
5 stars 0 forks source link

Can Craft CMS plugins be `--dev` installed? #3

Open studio-stomp opened 4 years ago

studio-stomp commented 4 years ago

Craft CMS plugins give benefit of bootstrapping Craft, which allows hooking into the loaded Twig extensions. But plugins need to be enabled, which means these type of plugins are (if using Project Config) also enabled in production. This means it can't be a --dev dependency (assuming in production only non-dev deps are installed)

studio-stomp commented 3 years ago

Has been refactored to a module, which makes this a bit easier already.

But: still allow requiring dev only. This could be done by setting up app.php files with a combination of env checking values and proper documentation how and why to do so.