-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
30 lines (28 loc) · 756 Bytes
/
Copy pathgulpfile.js
File metadata and controls
30 lines (28 loc) · 756 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
var gulp = require("gulp");
var eslint = require('gulp-eslint');
var webpack = require("webpack");
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack/webpack.config.js');
gulp.task('lint', function() {
return gulp.src(
[
'src/**/*.js'
])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('server', function() {
new WebpackDevServer(webpack(config), {
noInfo: true,
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true,
disableHostCheck: true
}).listen(3000, '0.0.0.0', function (err, result) {
if (err) {
return console.log(err);
}
console.log('Listening at http://localhost:3000/');
});
});