https://github.com/foolishchow/gulp-pliguns
Gulp Pliguns for node
https://github.com/foolishchow/gulp-pliguns
Last synced: 5 days ago
JSON representation
Gulp Pliguns for node
- Host: GitHub
- URL: https://github.com/foolishchow/gulp-pliguns
- Owner: foolishchow
- License: mit
- Created: 2015-10-19T10:49:29.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-29T14:07:01.000Z (over 10 years ago)
- Last Synced: 2025-11-16T08:23:26.472Z (7 months ago)
- Language: JavaScript
- Size: 660 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Gulp-2rem
-----
###change the Pixel in your css file into rem .
```js
var gulp = require('gulp'),
gulp2rem = require('gulp-2rem');
var option = {
"root_value": 20, // 1rem = 20px
"unit_precision": 5, // float length
"prop_white_list": [ // the attr you want to change to rem
"width",
"height",
"padding",
"padding-top",
"padding-right",
"padding-bottom",
"padding-left",
"margin",
"margin-top",
"margin-right",
"margin-bottom",
"margin-left"
],
"replace": false, // replace the px value to rem ,or add new attr unit by rem after
"media_query": false // egg: @media screen and (max-width:320px)
};
gulp.task('px2rem',function(){
gulp.src('./test/sample/*.css')
.pipe(gulp2rem(option))
.pipe(gulp.dest('./test/dest/'));
});
gulp.default(['px2rem'],function(){
gulp.watch('./test/sample/*.css',['px2rem']);
});
```