-
Notifications
You must be signed in to change notification settings - Fork 155
/
Gulpfile.js
37 lines (31 loc) · 887 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
37
var gulp = require('gulp'),
concat = require('gulp-concat'),
notify = require('gulp-notify');
var paths = {
animations: [
'./src/animationsAssist.js',
'./src/animationClass.js',
'./src/animations/fade.js',
'./src/animations/bounce.js',
'./src/animate.js'
]
};
gulp.task('build', function(){
return gulp.src(paths.animations)
.pipe(concat('animations.js'))
.pipe(gulp.dest('./dist/'))
.pipe(notify({message: 'Build done'}));
});
gulp.task('concat', function(){
var app = paths.animations.slice();
app.push('./src/app.js');
return gulp.src(app)
.pipe(concat('main.js'))
.pipe(gulp.dest('./src/'))
.pipe(notify({message: 'Concat done'}));
});
gulp.task('watch', function(){
gulp.watch(paths.animations, ['concat', 'build']);
gulp.watch('./src/app.js', ['concat']);
});
gulp.task('default', ['build' , 'concat', 'watch']);