-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
42 lines (29 loc) · 992 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
38
39
40
41
42
var gulp = require('gulp');
var livereload = require('gulp-livereload');
var webpackStream = require('webpack-stream');
var appWebpackConfig = require('./webpack.config.app.js');
var vendorWebpackConfig = require('./webpack.config.vendor.js');
var paths = {
electron: './electron',
build: './electron/dist'
}
gulp.task('clean', function () {
});
gulp.task('webpack-vendor', function () {
return gulp.src('vendor.bundle')
.pipe(webpackStream(vendorWebpackConfig))
.pipe(gulp.dest(paths.build));
});
gulp.task('webpack-app', function () {
return gulp.src('./src/app/app.ts')
.pipe(webpackStream(appWebpackConfig))
.pipe(gulp.dest(paths.build))
.pipe(livereload());
});
gulp.task('build', ['webpack-vendor', 'webpack-app'], function () {
});
gulp.task('watch', ['build'], function () {
livereload ({ basePath: paths.build, port: 35729})
livereload.listen();
return gulp.watch(['./src/**/*.*'], ['webpack-app']);
})