I have a package.json script that runs normal PostCSS:
"css": "postcss dev/css/styles.css --output css/styles.css"
I also watch certain files and reload the browser when there are changes. Before reloading I use Rollup to process any changes, such as repocessing the JavaScript, etc. I'm watch the CSS in the dev folder from above and would like to use this plugin to regenerate it just like the package.json script. However you don't have any documentation for input/output, from/to. Here's the script I have for PostCSS:
const bs = require("browser-sync").create();
const rollup = require("rollup")
const css = require('rollup-plugin-postcss')
bs.watch("dev/css/*.css").on("change",() => {
rollup.rollup({
input: './dev/css/styles.css',
plugins: [
css({
output: './css/styles.css'
})
]
})
})
P.S. I'm only using PostCSS to minify and move the CSS, nothing fancy. I would have used cssnano, which I used before, but there's no Rollup plugin for that and PostCSS uses it for minification anyway.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too