-
Notifications
You must be signed in to change notification settings - Fork 158
/
gulpfile.js
42 lines (41 loc) · 1.05 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
39
40
41
42
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
watch = require('gulp-watch'),
bump = require('gulp-bump');
gulp.task('uglify', function(){
gulp.src('src/Please.js')
.pipe(uglify({
preserveComments: 'some',
}))
.pipe(gulp.dest('dist'));
});
gulp.task('lint', function(){
return gulp.src('src/Please.js')
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});
gulp.task('bump-major', function(){
gulp.src(['./bower.json', './component.json', './package.json'])
.pipe(bump({type:'major'}))
.pipe(gulp.dest('./'));
});
gulp.task('bump-minor', function(){
gulp.src(['./bower.json', './component.json', './package.json'])
.pipe(bump({type:'minor'}))
.pipe(gulp.dest('./'));
});
gulp.task('bump-patch', function(){
gulp.src(['./bower.json', './component.json', './package.json'])
.pipe(bump({type:'patch'}))
.pipe(gulp.dest('./'));
});
/*
gulp.task('watch', function(){
gulp.watch('Please.js',['uglify']);
});
*/
gulp.task('default', [], function(){
gulp.start('uglify');
gulp.start('lint');
});