Skip to content

Commit a073cf4

Browse files
authored
Merge pull request #1 from postcss/master
merge
2 parents 5f92ee0 + 94170d6 commit a073cf4

File tree

3 files changed

+40
-7
lines changed

3 files changed

+40
-7
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
sudo: false
22
language: node_js
33
node_js:
4-
- stable
5-
- 6
4+
- node
5+
- "12"
6+
- "10"
67
after_success:
78
- "npm run coveralls"

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ several plugins, but parse CSS only once.
88

99
## Install
1010

11-
$ npm install --save-dev gulp-postcss
11+
$ npm install --save-dev postcss gulp-postcss
1212

1313
Install required [postcss plugins](https://www.npmjs.com/browse/keyword/postcss-plugin) separately. E.g. for autoprefixer, you need to install [autoprefixer](https://github.com/postcss/autoprefixer) package.
1414

@@ -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.
@@ -169,6 +193,11 @@ module.exports = function (ctx) {
169193

170194
## Changelog
171195

196+
* 9.0.0
197+
* Bump PostCSS to 8.0
198+
* Drop Node 6 support
199+
* PostCSS is now a peer dependency
200+
172201
* 8.0.0
173202
* Bump PostCSS to 7.0
174203
* Drop Node 4 support

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
"all": true,
1414
"check-coverage": true
1515
},
16-
"version": "8.0.0",
16+
"version": "9.0.0",
1717
"description": "PostCSS gulp plugin",
1818
"main": "index.js",
1919
"engines": {
20-
"node": ">=6"
20+
"node": "^10 || ^12 || >=14"
2121
},
2222
"scripts": {
2323
"coveralls": "coveralls < coverage/lcov.info",
@@ -43,8 +43,7 @@
4343
"dependencies": {
4444
"fancy-log": "^1.3.3",
4545
"plugin-error": "^1.0.1",
46-
"postcss": "^7.0.14",
47-
"postcss-load-config": "^2.0.0",
46+
"postcss-load-config": "^2.1.1",
4847
"vinyl-sourcemaps-apply": "^0.2.1"
4948
},
5049
"devDependencies": {
@@ -53,8 +52,12 @@
5352
"gulp-sourcemaps": "^2.6.5",
5453
"mocha": "^5.2.0",
5554
"nyc": "^12.0.2",
55+
"postcss": "^8.0.0",
5656
"proxyquire": "^2.1.0",
5757
"sinon": "^6.3.5",
5858
"vinyl": "^2.2.0"
59+
},
60+
"peerDependencies": {
61+
"postcss": "^8.0.0"
5962
}
6063
}

0 commit comments

Comments
 (0)