-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
34 lines (29 loc) · 1.03 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
require('es6-promise').polyfill();
var gulp = require('gulp');
const babel = require('gulp-babel');
gulp.task('es6toes5', function() {
return gulp.src(['dakara-client-build/**/*.js','!client-temp/**/lib/*','!client-temp/**/build.js','!client-temp/**/home.js'])
.pipe(babel({
presets: ['es2015']
}))
.pipe(gulp.dest('dakara-client-build'))
});
gulp.task('es6toes5-tempclient', function() {
return gulp.src(['client-temp/**/*.js','!client-temp/**/lib/*','!client-temp/**/build.js','!client-temp/**/home.js'])
.pipe(babel({
presets: ['es2015']
}))
.pipe(gulp.dest('client-temp'))
});
var uglify = require('gulp-uglify');
gulp.task('uglify', function() {
return gulp.src('dakara-client-build/**/*.js')
.pipe(uglify({
compress: {
pure_funcs: ['console.log', 'log.error', 'log.info','log.network']
},
comments : 'license',
lint: true
}))
.pipe(gulp.dest('dakara-client-build'));
});