3 * STANDARD_RIFT_IO_COPYRIGHT
5 var Webpack
= require('webpack');
6 var WebpackDevServer
= require('webpack-dev-server');
7 var webpackConfig
= require('./../webpack.config.js');
8 var path
= require('path');
9 var fs
= require('fs');
10 var mainPath
= path
.resolve(__dirname
, '..', 'app', 'main.js');
12 module
.exports = function () {
13 var bundleStart
= null;
14 var compiler
= Webpack(webpackConfig
);
16 compiler
.plugin('compile', function() {
17 console
.log('Bundling...');
18 bundleStart
= Date
.now();
21 compiler
.plugin('done', function() {
22 console
.log('Bundled in ' + (Date
.now() - bundleStart
) + 'ms!');
25 var bundler
= new WebpackDevServer(compiler
, {
26 contentBase
: "http://localhost",
27 publicPath
: '/build/',
38 bundler
.listen(8080, 'localhost', function () {
39 console
.log('Bundling project, please wait...');