Skip to content

Commit c1c8055

Browse files
committed
Add docs explaining how to pass options when using postcss.config.js.
1 parent 3050ba7 commit c1c8055

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,21 @@ gulp.task('default', function () {
9292
});
9393
```
9494

95+
If you are using a `postcss.config.js` file, you can pass PostCSS options as the first argument to gulp-postcss.
96+
97+
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()`:
98+
99+
```js
100+
var gulp = require('gulp');
101+
var postcss = require('gulp-postcss');
102+
103+
gulp.task('default', function () {
104+
return gulp.src('in.scss')
105+
.pipe(postcss({ to: 'out/in.css' }))
106+
.pipe(gulp.dest('out'));
107+
});
108+
```
109+
95110
## Using a custom processor
96111

97112
```js

0 commit comments

Comments
 (0)