Skip to content

Commit 00698a5

Browse files
authored
Merge pull request #164 from alkorlos/refactor-readme-pcss-extension
Using with .pcss extension
2 parents 5f92ee0 + dd4c4e9 commit 00698a5

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,30 @@ gulp.task('css', function () {
4848
});
4949
```
5050

51+
## Using with .pcss extension
52+
53+
For using gulp-postcss to have input files in .pcss format and get .css output need additional library like gulp-rename.
54+
55+
```js
56+
var postcss = require('gulp-postcss');
57+
var gulp = require('gulp');
58+
const rename = require('gulp-rename');
59+
60+
gulp.task('css', function () {
61+
return gulp.src('./src/*.pcss')
62+
.pipe(postcss())
63+
.pipe(rename({
64+
extname: '.css'
65+
}))
66+
.pipe(gulp.dest('./dest'));
67+
});
68+
```
69+
70+
This is done for more explicit transformation. According to [gulp plugin guidelines](https://github.com/gulpjs/gulp/blob/master/docs/writing-a-plugin/guidelines.md#guidelines)
71+
72+
> Your plugin should only do one thing, and do it well.
73+
74+
5175
## Passing additional options to PostCSS
5276

5377
The second optional argument to gulp-postcss is passed to PostCSS.

0 commit comments

Comments
 (0)