forked from auth0/auth0.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
27 lines (23 loc) · 809 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
var gulp = require('gulp');
var gutil = require('gulp-util');
var webpack = require('webpack');
var webpackStream = require('webpack-stream');
var WebpackDevServer = require('webpack-dev-server');
var webpackConfig = require('./webpack.config.js');
var webpackProdConfig = require('./webpack.prod.config.js');
gulp.task('build', function () {
return gulp.src('src/index.js')
.pipe(webpackStream(webpackProdConfig))
.pipe(gulp.dest('build/'));
});
gulp.task('dev', function () {
var compiler = webpack(webpackConfig);
new WebpackDevServer(compiler, {
https: true
}).listen(3000, 'localhost', function (err) {
if (err) {
throw new gutil.PluginError('webpack-dev-server', err);
}
gutil.log('[webpack-dev-server]', 'https://localhost:3000/example/index.html');
});
});