taskr-outdated
taskr-outdated copied to clipboard
[postcss] Add support for common config
Hey, it's just a reminder for me.
PostCSS currently support common configuration file postcss.config.js
It would be nice to add this feature in taskr plugin as well.
PS. I played with labels, feel free to change naming how you like.
Sounds good! I can crank this out real quick, unless you're on it already.
And I edited the label to just be "plugin" for now. Can adapt as the issues come in.
Man, you are fast :) I am not on it yet, you can take it if you wish, unless you have higher priority tasks.
Haha 😇 I'm getting started for the day! I like to do small OSS fixes to "warm up"
I'll open a PR and await your review since you are the expert here 👍
So, I think supporting the "postcss" key inside package.json is also a good idea.
What about supporting custom filenames (eg, path/to/config.js) and the unofficial rc-files? (.postcssrc, .postcss.yml, etc)
These options would look like:
// autoload `postcss.config.js`
// or "postcss" key in `package.json`
yield task.source(...).postcss().target(...);
// specify a custom config
yield task.source(...).postcss('path/to/config.js').target(...);
yield task.source(...).postcss({ config: 'path/to/config.js' }).target(...);
// send options (current)
yield task.source(...).postcss({ plugins:[], options:{} }).target(...);
I am unsure about the custom configs (2 & 3).
postcss ecosystem has common way for doing this - postcss-load-config . If you don't want to add it as dependency i guess that options described in readme should be supported.
Right, I just saw that too. I checked it out & it has a lot of dependencies that mimics what we already have built-in.
Sending a PR now. Tests to follow later