forked from ionic-team/ionic-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
33 lines (28 loc) · 809 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
31
32
33
var gulp = require('gulp');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var livereload = require('gulp-livereload');
var lr = require('tiny-lr');
var paths = {
sass: ['scss/**/*.scss']
};
gulp.task('sass', function(done) {
return gulp.src('./scss/site.scss')
.pipe(sass())
.pipe(gulp.dest('./css/'))
.pipe(minifyCss({
keepSpecialComments: 0
}))
.pipe(rename({ extname: '.min.css' }))
.pipe(gulp.dest('./css/'));
});
gulp.task('watch', function() {
var server = livereload(lr().listen());
gulp.watch('_site/**/*').on('change', function(file) {
server.changed(file.path);
});
return gulp.watch(paths.sass, ['sass']);
});
gulp.task('default', ['sass']);