making coriolis enhanced deploy ready...

This commit is contained in:
Paul Heisig
2016-10-07 21:26:27 +02:00
parent 266c63bc0c
commit ed0d4ddc48
8 changed files with 931 additions and 8 deletions

View File

@@ -1,9 +1,21 @@
var path = require('path');
var exec = require('child_process').exec;
var webpack = require('webpack');
var pkgJson = require('./package');
var HtmlWebpackPlugin = require("html-webpack-plugin");
var ExtractTextPlugin = require("extract-text-webpack-plugin");
function CopyDirPlugin(source, destination) {
this.source = source;
this.destination = destination;
}
CopyDirPlugin.prototype.apply = function(compiler) {
compiler.plugin('done', function() {
console.log(compiler.outputPath, this.destination);
exec('cp -r ' + this.source + ' ' + path.join(compiler.outputPath, this.destination));
}.bind(this));
};
module.exports = {
devtool: 'eval',
devServer: {
@@ -23,6 +35,7 @@ module.exports = {
publicPath: '/'
},
plugins: [
new CopyDirPlugin(path.join(__dirname, 'src/.htaccess'), ''),
new webpack.optimize.CommonsChunkPlugin('lib', 'lib.js'),
new HtmlWebpackPlugin({
inject: false,