forked from Makanz/chartjs-plugin-trendline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
37 lines (32 loc) · 938 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
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var pump = require('pump');
var rename = require('gulp-rename');
var del = require('del');
var bump = require('gulp-bump');
gulp.task('clean', function () {
return del([
'dist/',
]);
});
gulp.task('compress', function (cb) {
pump([
gulp.src('src/*.js'),
uglify(),
rename('chartjs-plugin-trendline.min.js'),
gulp.dest('dist/')
],
cb
);
});
gulp.task('bump-minor', function(){
return gulp.src(['./package.json', './src/chartjs-plugin-trendline.js'], {base: './'})
.pipe(bump({type:'minor'}))
.pipe(gulp.dest('./'));
});
gulp.task('bump-patch', function(){
return gulp.src(['./package.json', './src/chartjs-plugin-trendline.js'], {base: './'})
.pipe(bump({type:'patch'}))
.pipe(gulp.dest('./'));
});
gulp.task('default', gulp.series('clean', 'compress'));