Skip to content

Commit

Permalink
Add docs explaining how to pass options when using postcss.config.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAlbin committed Mar 27, 2021
1 parent 3050ba7 commit c1c8055
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,21 @@ gulp.task('default', function () {
});
```

If you are using a `postcss.config.js` file, you can pass PostCSS options as the first argument to gulp-postcss.

This, for instance, will let PostCSS know what the final file destination path is, since it will be unaware of the path given to `gulp.dest()`:

```js
var gulp = require('gulp');
var postcss = require('gulp-postcss');

gulp.task('default', function () {
return gulp.src('in.scss')
.pipe(postcss({ to: 'out/in.css' }))
.pipe(gulp.dest('out'));
});
```

## Using a custom processor

```js
Expand Down

0 comments on commit c1c8055

Please sign in to comment.