forked from inorganik/countUp.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
36 lines (33 loc) · 910 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
var gulp = require('gulp');
var wrap = require('gulp-wrap-umd');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var del = require('del');
gulp.task('clean', function(cb) {
del(['dist/*.js']);
return cb();
});
gulp.task('umd', ['clean'], function(file) {
var umdCountup = gulp
.src('countUp.js')
.pipe(wrap({
namespace: 'CountUp',
exports: 'CountUp'
}))
.pipe(gulp.dest('dist/'))
.pipe(uglify({preserveComments: 'license'}))
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('dist/'));
var angularCountup = gulp
.src('angular-countUp.js')
.pipe(gulp.dest('dist/'))
.pipe(uglify())
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('dist/'));
});
gulp.task('build', ['umd']);
gulp.task('default', ['build']);