-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (32 loc) · 1.04 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
35
36
37
38
var gulp = require('gulp');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var baseFiles = [
'src/leaflet.shadowwrap.hook.js',
'src/leaflet.shadowwrap.exception.js',
'src/leaflet.shadowwrap.dispatch.js',
'src/leaflet.shadowwrap.shadows.js',
'src/leaflet.shadowwrap.calcshadow.js'
];
var drawFiles = [
'src/leaflet.shadowwrap.draw.js'
];
gulp.task('build', function(cb) {
gulp.src(baseFiles)
.pipe(concat('leaflet.shadowwrap.js'))
.pipe(gulp.dest('dist'))
.pipe(rename('leaflet.shadowwrap.min.js'))
.pipe(uglify())
.pipe(gulp.dest('dist'));
cb();
});
gulp.task('build draw', ['build'], function() {
return gulp.src(drawFiles)
.pipe(concat('leaflet.shadowwrap.draw.js'))
.pipe(gulp.dest('dist'))
.pipe(rename('leaflet.shadowwrap.draw.min.js'))
.pipe(uglify())
.pipe(gulp.dest('dist'));
});
gulp.task('default', ['build', 'build draw']);