gulp-px2rem
Version: 1.1.4
This is a Gulp plugin for node-px2rem.
Installation
Run npm install gulp-px2rem
Usage
const px2rem = require('gulp-px2rem');
gulp.task('css', () => {
return 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.
const px2rem = require('gulp-px2rem');
const px2remOptions = {
replace: false
};
const postCssOptions = {
map: true
};
gulp.task('css', () => {
return gulp.src('css/**/*.css')
.pipe(px2rem(px2remOptions, postCssOptions))
.pipe(gulp.dest('css'));
});
License
MIT © 2021 Gergely Kovács (gg.kovacs@gmail.com)