hechoendrupal / drupal-console

The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.
http://drupalconsole.com
GNU General Public License v2.0
940 stars 559 forks source link

[Feature][config:export] Allow to skip config export of modules. #3200

Open joshirohit100 opened 7 years ago

joshirohit100 commented 7 years ago

We have command to export all configuration and export single one but there are certain modules which we require on local but not on other environments. So there should be a way not to export (skip) config of those module in export.

config:export --skip=mymoduleA, mymoduleB

or we can go by individual files. Thoughts ?

cburschka-pwc commented 7 years ago

Note that there is no clear mapping of config to modules - though you might filter configuration objects by name, or by their dependencies.

When filtering by name, it might be more convenient to maintain a .gitignore file in the configuration directory, to ensure that the files are excluded from the repository.

I'd sort of advise against altering the config:export behavior itself, because the general assumption is that the staged configuration is a complete copy of the active one. A subsequent config:import will delete configuration objects that aren't exported. (This doesn't apply if you're exporting to a tar archive, of course.)