-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
38 lines (34 loc) · 976 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
38
var gulp = require('gulp');
var concat = require('gulp-concat');
var strip = require('gulp-strip-comments');
var uglify = require('gulp-uglify');
var headerfooter = require('gulp-header-footer');
var gulpSequence = require('gulp-sequence');
var header="\
/*\n\
MIT LICENSE @2016 Ivan Lausuch <[email protected]>\n\
Developed at CEU University\n\
*/";
gulp.task('compile', function(){
return gulp.src('src/*.js')
.pipe(strip())
.pipe(concat('ilModels.js'))
.pipe(headerfooter({
header:header,
footer:'',
filter: function(file){
return true;
}
}))
.pipe(gulp.dest('dist'));
});
gulp.task('minimize', function(){
return gulp.src('dist/ilModels.js')
.pipe(strip())
.pipe(uglify())
.pipe(concat('ilModels.min.js'))
.pipe(gulp.dest('dist'));
});
gulp.task("build",function(cb){
gulpSequence('compile','minimize',cb);
});