https://github.com/cuth/gulp-pxtorem
A Gulp plugin for pxtorem
https://github.com/cuth/gulp-pxtorem
Last synced: 11 months ago
JSON representation
A Gulp plugin for pxtorem
- Host: GitHub
- URL: https://github.com/cuth/gulp-pxtorem
- Owner: cuth
- License: mit
- Created: 2014-07-03T16:31:28.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-05-22T22:11:14.000Z (about 9 years ago)
- Last Synced: 2025-07-25T23:57:00.753Z (11 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 22
- Watchers: 1
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-pxtorem [](http://badge.fury.io/js/gulp-pxtorem)
This is a Gulp plugin for [postcss-pxtorem](https://github.com/cuth/postcss-pxtorem).
### Installation
```shell
npm install gulp-pxtorem --save-dev
```
### Example
```js
var pxtorem = require('gulp-pxtorem');
gulp.task('css', function() {
gulp.src('css/**/*.css')
.pipe(pxtorem())
.pipe(gulp.dest('css'));
});
```
### Options
Pass in two option objects. The first one for [postcss-pxtorem](https://github.com/cuth/postcss-pxtorem) options, the second for [postcss](https://github.com/postcss/postcss) options.
```js
var pxtorem = require('gulp-pxtorem');
var pxtoremOptions = {
replace: false
};
var postcssOptions = {
map: true
};
gulp.task('css', function() {
gulp.src('css/**/*.css')
.pipe(pxtorem(pxtoremOptions, postcssOptions))
.pipe(gulp.dest('css'));
});
```