-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgulpfile.js
37 lines (33 loc) · 912 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 concat = require('gulp-concat');
var minify = require('gulp-minify');
var browserify = require('gulp-browserify');
var rename = require('gulp-rename');
var jshint = require('gulp-jshint');
// Change this to the location you would like to deploy to.
var copyDir = '<path_to_dest>/oncogrid';
gulp.task('default', function() {
gulp.src(['src/index.js'])
.pipe(browserify({
insertGlobals : false
}))
.pipe(rename('oncogrid.js'))
.pipe(minify({
ext: {
src: '-debug.js',
min: '.min.js'
},
exclude: ['tasks']
}))
.pipe(gulp.dest('dist'));
});
gulp.task('lint', function() {
gulp.src(['src/*'])
.pipe(jshint({
predef: ["d3"]
}))
.pipe(jshint.reporter('default'));
});
gulp.task('copy', function () {
gulp.src('dist/oncogrid-debug.js').pipe(gulp.dest(copyDir));
});