forked from netanelgilad/angular-cesium-DEPRECATED
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
34 lines (29 loc) · 1.05 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
var gulp = require('gulp');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
var ngAnnotate = require('gulp-ng-annotate');
var traceur = require('gulp-traceur');
var uglify = require('gulp-uglify');
gulp.task('compile', function(){
return gulp.src('src/**/*.js')
.pipe(traceur({experimental: true, blockBinding: true, arrayComprehension: true}))
.pipe(gulp.dest('build'));
});
gulp.task('build', function() {
return gulp.src('src/**/*.js')
.pipe(sourcemaps.init())
.pipe(traceur({experimental: true, blockBinding: true, arrayComprehension: true}))
.pipe(concat('angular-cesium.js'))
.pipe(sourcemaps.write())
.pipe(gulp.dest('dist'));
});
gulp.task('dist', function () {
return gulp.src('src/**/*.js')
.pipe(traceur({experimental: true, blockBinding: true, arrayComprehension: true}))
.pipe(concat('angular-cesium.min.js'))
.pipe(ngAnnotate())
.pipe(uglify())
.pipe(gulp.dest('dist'));
});
gulp.task('default', ['compile', 'build', 'dist']);
//gulp.watch('src/**/*.js', ['default']);