drupal-composer / preserve-paths

A composer plugin for keeping specified files and directories when installing/updating new composer packages. Can be used to supported nested packages.
28 stars 28 forks source link

Negated paths would be useful #25

Open garrettw opened 6 years ago

garrettw commented 6 years ago

I am attempting to use this package to install WordPress along with plugins and themes using only Composer. The problem is, if I preserve wp-content as a whole, the files under plugins and themes that are included in WP core do not get installed at all.

What would really solve this issue for me is the ability to also add negated paths so that composer will still install those but not touch any other plugins/themes. Something like this:

"preserve-paths": [
  "wp-content",
  "!wp-content/plugins/akismet",
  "!wp-content/themes/twentyseventeen"
]

Could this feature be added?