-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgulpfile.js
More file actions
25 lines (21 loc) · 720 Bytes
/
gulpfile.js
File metadata and controls
25 lines (21 loc) · 720 Bytes
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
var gulp = require('gulp');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var clean = require('gulp-clean');
gulp.task('clean', function() {
return gulp.src('./build', {read: false})
.pipe(clean());
});
gulp.task('build', function() {
return gulp.src(['./src/IIG.js', './src/ImageManager.js', './src/Animation.js', './src/Image.js', './src/Utils.js'])
.pipe(concat('IIG.js'))
.pipe(gulp.dest('./build/'))
.pipe(uglify())
.pipe(rename({suffix:'.min'}))
.pipe(gulp.dest('./build/'));
});
gulp.task('watch', function() {
gulp.watch('./src/*.js', ['clean', 'build']);
});
gulp.task('default', ['clean', 'build', 'watch']);