node package manager

gulp-px2rem

A gulp plugin for node-px2rem

gulp-px2rem NPM version Dependency Status

Version: 1.0.11

This is a Gulp plugin for node-px2rem.

Installation

Run npm install gulp-px2rem

Usage

var px2rem = require('gulp-px2rem');
 
gulp.task('css', function() {
    gulp.src('css/**/*.css')
        .pipe(px2rem())
        .pipe(gulp.dest('css'));
});

Options

Pass in two option objects. The first one for node-px2rem options, the second for postcss options.

var px2rem = require('gulp-px2rem');
 
var px2remOptions = {
    replace: false
};
 
var postCssOptions = {
    map: true  
};
 
gulp.task('css', function() {
    gulp.src('css/**/*.css')
        .pipe(px2rem(px2remOptions, postCssOptions))
        .pipe(gulp.dest('css'));
});

License

MIT © 2016 Gergely Kovács (gg.kovacs@gmail.com)