vigour-io / postcssify

Browserify transform for postcss
ISC License
4 stars 1 forks source link

filePlugins not getting called #35

Closed LaurieSReynolds closed 7 years ago

LaurieSReynolds commented 7 years ago

In a small test project, I am calling postcssify with the postcss-advanced-variables plugin and it is not getting called. The resulting css still contains the variable definition.

"start": "browserify ./src/client.js -d $npm_package_config_browserify_transforms --extension=jsx -o public/bundle.js",

"browserify_transforms": "-t babelify -t require-globify -g [postcssify  --filePlugins postcss-advanced-variables -o public//bundle.css ]"

Github test project: https://github.com/LaurieSReynolds/react-browserify-boilerplate


If I hard code the plugin into the postcssify index.js array of processors, the plugin is invoked and the variable is replaced with the correct value.

https://github.com/vigour-io/postcssify/blob/master/lib/index.js


I am using version 2.5.0 of postcssify


How can I correctly specify postcss plugins?

kevindente commented 7 years ago

Looking through the code, it looks like the processor list is currently hard-coded. I have to assume this was a mistake, yes?

jimdebeer commented 7 years ago

I think the readme should be updated, there are zero config options atm

jimdebeer commented 7 years ago

@mstdokumaci could you perhaps do this?

kevindente commented 7 years ago

I'm sorry, is the intent here that you can't configure the postcss plugins? If so, I need to find a different transform to use.

mstdokumaci commented 7 years ago

Unfortunately we require and use only a few plugins and they are hard coded, we didn't implement it configurable. Sorry for the inconvenience.

kevindente commented 7 years ago

Would you accept a PR to implement the configuration stuff?

mstdokumaci commented 7 years ago

If you have time to implement it, sure it's all welcome.