forked from ebidel/filer.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
32 lines (27 loc) · 932 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
const gulp = require('gulp');
const gulpLoadPlugins = require('gulp-load-plugins');
const closure = require('google-closure-compiler-js').gulp();
const injectVersion = require('gulp-inject-version');
const $ = gulpLoadPlugins();
function license() {
return $.license('Apache', {
organization: 'Copyright (c) 2016 Eric Bidelman. All rights reserved.\n\n * @version %%GULP_INJECT_VERSION%%',
tiny: true
});
}
gulp.task('script', function() {
return gulp.src('./src/filer.js', {base: './'})
.pipe(closure({
compilationLevel: 'SIMPLE',
warningLevel: 'DEFAULT',
languageIn: 'ECMASCRIPT6_STRICT',
languageOut: 'ECMASCRIPT5',
jsOutputFile: 'filer.min.js',
createSourceMap: true,
}))
.pipe(license()) // Add license to top.
.pipe(injectVersion())
.pipe(gulp.dest('./dist'));
});
gulp.task('default', ['script'], function() {
});