egoist / egoist/rollup-plugin-postcss

No way to designate input and output.

Open
#125 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
689
Forks
210
PR merge metrics
No merged PRs in 30d

Description

I have a package.json script that runs normal PostCSS:

```javascript
"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:

```javascript
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.