forked from beeblebrox3/modal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
36 lines (31 loc) · 952 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
34
35
36
var gulp = require('gulp'),
gutil = require('gulp-util'),
uglify = require('gulp-uglify'),
watch = require('gulp-watch');
sass = require('gulp-sass'),
jshint = require('gulp-jshint'),
minifyCss = require('gulp-minify-css');
gulp.task('default', function () {
gulp.src('src/js/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'));
gulp.src('src/js/*.js')
.pipe(uglify())
.pipe(gulp.dest('dist/js'));
gulp.src('src/css/*.scss')
.pipe(sass())
.pipe(minifyCss({
removeEmpty: true
}))
.pipe(gulp.dest('dist/css'));
});
gulp.task('dev', function () {
gulp.src('src/js/*.js')
.pipe(watch(function (files) {
return files.pipe(gulp.dest('dist/js'));
}));
gulp.src('src/css/*.scss')
.pipe(watch(function (files) {
return files.pipe(sass()).pipe(gulp.dest('dist/css'));
}));
});