-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
33 lines (29 loc) · 892 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
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var babel = require('gulp-babel');
gulp.task('lint', function() {
return gulp.src('src/manuh-bridge.js')
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
gulp.task('dist', function() {
return gulp.src(['src/**/*.js'])
// .pipe(concat('manuh-bridge.js'))
.pipe(gulp.dest('dist'))
// .pipe(rename('manuh-bridge.min.js'))
.pipe(babel({
presets: ['env']
}))
.pipe(uglify().on('error', function(e){
console.log(e);
}))
.pipe(gulp.dest('dist'));
});
gulp.task('watch', function() {
gulp.watch('*.js', ['lint', 'scripts']);
});
// Default Task
gulp.task('default', ['lint', 'scripts', 'watch']);