-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathgulpfile.js
More file actions
31 lines (26 loc) · 894 Bytes
/
gulpfile.js
File metadata and controls
31 lines (26 loc) · 894 Bytes
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
const gulp = require('gulp');
const del = require('del');
const webpack = require('webpack-stream');
const typescript = require('gulp-typescript');
// Added to ensure that our generated JS is strict mode compatible
const jshint = require('gulp-jshint');
gulp.task('clean', function () {
return del([
'bundle/**/*'
]);
});
gulp.task('bundle', () => {
return gulp.src('./index.js')
.pipe(webpack(require('./webpack.config.js')))
.pipe(gulp.dest('bundle/'));
});
gulp.task('compile', function(){
return gulp.src(['types/index.d.ts'])
.pipe(typescript())
});
gulp.task('lint', function() {
return gulp.src(['*/**.js', '!./{node_modules, node_modules/**}', '!./bundle/sdk.js', '!./bundle/sdk.min.js'])
.pipe(jshint())
.pipe(jshint.reporter('default'))
});
gulp.task('default', gulp.series(['clean', 'bundle', 'lint', 'compile']));