postcss-js
postcss-js copied to clipboard
.sync API
Just had a nasty issue that took .. a few hours of my life .. using .sync without anything passed, didn't realize an empty array was at least expected.
const plugin = require("tailwindcss/plugin");
const postcssJs = require("postcss-js");
const styles = require("../dist/styles");
module.exports = plugin(function ({ addComponents }) {
let postcssJsProcess;
postcssJsProcess = postcssJs.sync(); // ... []
result = postcssJsProcess(styles);
addComponents(result);
});
Any way to clarify the Readme a bit to add an example or two for .sync?
What problem do you have of passing undefined
to postcssJs.sync()
?
We can throw an error on missed argument.