var webpack = require('webpack');

var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');


function Build() {
    webpack(config).run();    
}

function Run() {
    new WebpackDevServer(webpack(config), {
        publicPath: config.output.publicPath,
        hot: true,
    }).listen(1337, 'localhost', function (err, result) {
        if (err) { console.log(err) }
        console.log('Listening at localhost:1337');
        });
}

Build();
