-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGulpfile.js
More file actions
40 lines (31 loc) · 767 Bytes
/
Gulpfile.js
File metadata and controls
40 lines (31 loc) · 767 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
32
33
34
35
36
37
38
39
40
var gulp = require('gulp');
var webpack = require('gulp-webpack');
var concat = require('gulp-concat');
var clean = require('gulp-clean');
gulp.task('webpack', function() {
return gulp.src('src/toh_header.js')
.pipe(webpack({
output: {
filename: 'modules.js'
}
}))
.pipe(gulp.dest(''));
});
gulp.task('scripts', ['clean', 'webpack'], function() {
return gulp.src([ 'src/preload.js', 'modules.js'])
.pipe(concat('toh_header.js'))
.pipe(gulp.dest('./'));
});
gulp.task('clean', function () {
return gulp
.src(['dist'], {
read: false
})
.pipe(clean());
});
gulp.task('watch', function(){
gulp.watch([
'src/**/*.js'
], ['clean', 'webpack', 'scripts']);
});
gulp.task('build', ['scripts']);