mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 14:33:22 +00:00
making coriolis enhanced deploy ready...
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user