-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
30 lines (26 loc) · 847 Bytes
/
gulpfile.js
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
27
28
29
30
var gulp = require('gulp');
var sass = require('gulp-sass');
var rename = require('gulp-rename');
gulp.task('sass', function () {
return gulp.src(['./src/main.scss'])
//.pipe(sourcemaps.init())
.pipe(sass({
sourceMapEmbed: true,
sourceMap: './dist/one-true-form.css.map'
}).on('error', sass.logError))
.pipe(rename('one-true-form.css'))
//.pipe(sourcemaps.write())
.pipe(gulp.dest('./dist'));
});
gulp.task('sass:minify', function() {
gulp.src(['./src/main.scss'])
.pipe(sass({
outputStyle: 'compressed'
}))
.pipe(rename('one-true-form.min.css'))
.pipe(gulp.dest('./dist'));
});
gulp.task('sass:watch', function () {
gulp.watch('./src/**/*.scss', ['sass', 'sass:minify']);
});
gulp.task('default', ['sass:watch']);