forked from shuyu/angular-material-fileinput
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
63 lines (55 loc) · 1.3 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
compass = require('gulp-compass'),
minifycss = require('gulp-minify-css'),
rename = require('gulp-rename'),
del = require('del');
gulp.task('default', ['clean'], function() {
gulp.start('styles', 'scripts');
});
gulp.task('clean', function() {
del('./dist/*');
});
gulp.task('scripts', function() {
gulp.src('src/*.js')
.pipe(
gulp.dest('./dist')
)
.pipe(
rename({suffix: '.min'})
)
.pipe(
uglify()
).pipe(
gulp.dest('./dist')
);
});
gulp.task('styles', function() {
gulp.src('./src/*.scss')
.pipe(
compass({
css: './dist',
sass: './src',
image: './src/images',
generated_images_path:'./dist/sprites'
})
).pipe(
minifycss()
).pipe(
rename({suffix: '.min'})
).pipe(
gulp.dest('./dist')
);
});
gulp.task('compass:watch',function(){
gulp.watch('./src/*.scss', ['compass']);
});
gulp.task('watch',function(){
gulp.watch('./src/*', ['scripts','styles']);
});
gulp.task('compass:watch',function(){
gulp.watch('./src/*.scss', ['styles']);
});
gulp.task('scripts:watch',function(){
gulp.watch('./src/*.js', ['scripts']);
});