-
Notifications
You must be signed in to change notification settings - Fork 7
/
gulpfile.js
executable file
·51 lines (45 loc) · 1.1 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
43
44
45
46
47
48
49
50
51
// include gulp
var gulp = require('gulp'),
babel = require('gulp-babel'),
webpack = require('webpack-stream');
// include plug-ins
var jshint = require('gulp-jshint');
// JS hint task
gulp.task('jshint', function() {
gulp.src('./src/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
// JS concat, strip debugging and minify
gulp.task('scripts', function() {
return gulp.src('src/ccBooleanAnalysis.js')
.pipe(webpack({
entry: './src/ccBooleanAnalysis.js',
output: {
filename: 'ccBooleanAnalysis.js',
library: 'ccBooleanAnalysis',
libraryTarget: "umd"
},
debug:true,
devtool: 'source-map',
module:{
loaders: [
{
exclude: /(node_modules|bower_components)/,
query: {
presets: ['es2015']
},
loader: 'babel' // 'babel-loader' is also a legal name to reference
}
]
}
}))
.pipe(gulp.dest('build/'));
});
// default gulp task
gulp.task('default', function () {
// watch for JS changes
gulp.watch('./src/*.js', function() {
gulp.run('jshint', 'scripts');
});
});