-
Notifications
You must be signed in to change notification settings - Fork 85
/
gulpfile.js
37 lines (33 loc) · 851 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
'use strict';
const gulp = require('gulp');
const rename = require('gulp-rename');
const uglify = require('gulp-uglify');
const pump = require('pump');
gulp.task('svg-inject', function (cb) {
pump([
gulp.src('src/svg-inject.js'),
gulp.dest('dist/'),
gulp.dest('examples/'),
gulp.dest('test/js/'),
uglify({
output: {
preamble: "/* MIT License - https://github.com/iconfu/svg-inject/blob/master/LICENSE */"
},
ie8: true,
output: {
max_line_len: 500
}
}),
rename({ extname: '.min.js' }),
gulp.dest('examples/'),
gulp.dest('test/js/'),
gulp.dest('dist/')
], cb);
});
gulp.task('xhr-check', function (cb) {
pump([
gulp.src('test/js/xhr-check.js'),
gulp.dest('examples/_example_helpers/')
], cb);
});
gulp.task('default', ['svg-inject', 'xhr-check']);