taskr-outdated
taskr-outdated copied to clipboard
Autoload PostCSS configs
When no options are passed, the @taskr/postcss plugin will now look for & respect configs found within: ~(arranged by preference):~
- a
.postcssrcfile (JSON-type only) - the "postcss" key inside
package.json - a
postcss.config.jsfile (ObjectorFunctiontype) - a
.postcssrc.jsfile (ObjectorFunctiontype)
As for usage, all options are available:
// send options (current)
yield task.source(...).postcss({
plugins: [],
options: {}
}).target(...);
// run autoload checks (any of above)
yield task.source(...).postcss().target(...);
An error will be emitted, forcing the plugin to stop, if the final/parsed options is not an Object.
~TODO: Add autoload-config tests.~
Closes #4
@hzlmn PostCSS has way more config-combinations than I initially anticipated, lol. Definitely took more time than I expected to, too 😅 80 LOC for just options-handling
Check it out, and let me know if it works for you. Once you approve, I'll cut this as 1.1.0.