Open ctalkington opened 8 years ago
You can also override the config in the theme just by pulling the individual config into the theme's config
dir and updating whatever values you need to change.
That said, I agree there really should be a better way to adjust PostCSS modules as we may end up using more of them in the future as things shift more and more away from preprocessors.
you actually can't do that reliably as load-grunt-config
default merge will simply replace within arrays so you would need no-ops for every processor to avoid grunt-postcss
throwing up.
ie
[ pixtorem(), autoprefixer() ] merged with
[ bananas() ] becomes
[ bananas(), autoprefixer() ]
Ahhh I see... that could probably get pretty screwy depending on what needed to be configured.
Maybe it would be worth opening an issue about this on load-project-config
? I'm sure @bradyvercher would make whatever adjustments are necessary.
yah i think i will open issue regarding passing options to load-grunt-config
from load-project-config
because once again a way to override exists
// use different function to merge config files
mergeFunction: require('recursive-merge')
@ctalkington So now that this is merged in, what's the best method for handling this?
@robneu this is on my radar and will be messing with it a bit more in the upcoming week or so.
i've been going back and forth with a way to use grunt configs to fine tune the options of each postcss processor as the way it works now it can only be configured via functions and if i were to say want to change the
rootValue
for pxtorem (or disable for specific project), I have to do the following in my gruntfile.it would be possible to support something globally if
load-project-config
allowed passing options toload-grunt-config
as therespostProcess
option which would allow inherit and override as we get with other tasks but convert it to aprocessors
array JIT