1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
const gulp = require('gulp');
const postcss = require('gulp-postcss');
const rfs = require('../../..');
const options = {
twoDimensional: false,
baseFontSize: 16,
fontSizeUnit: 'rem',
breakpoint: 1200,
breakpointUnit: 'px',
factor: 5,
class: false,
unitPrecision: 6,
safariIframeResizeBugFix: false,
remValue: 16,
propList: ['responsive-font-size', 'rfs']
};
gulp.task('build', () => {
return gulp.src('./src/main.css')
.pipe(postcss([rfs(options)]))
.pipe(gulp.dest('./dest'));
});
gulp.task('watch', function () {
gulp.watch('./src/**/*.css', ['build']);
});
|