|
|
@ -1,15 +1,23 @@ |
|
|
|
var webpack = require('webpack'), |
|
|
|
var webpack = require('webpack'), |
|
|
|
path = require('path'), |
|
|
|
path = require('path'), |
|
|
|
|
|
|
|
_ = require('lodash'), |
|
|
|
pathConfig = require('./config/rails-plugins.conf'); |
|
|
|
pathConfig = require('./config/rails-plugins.conf'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var pluginEntries = _.reduce(pathConfig.pluginNamesPaths, function(entries, path, name) { |
|
|
|
|
|
|
|
entries[name.replace(/^openproject\-/, '')] = name; |
|
|
|
|
|
|
|
return entries; |
|
|
|
|
|
|
|
}, {}); |
|
|
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
module.exports = { |
|
|
|
context: __dirname + '/app/assets/javascripts/angular', |
|
|
|
context: __dirname + '/app/assets/javascripts/angular', |
|
|
|
|
|
|
|
|
|
|
|
entry: './openproject-app.js', |
|
|
|
entry: _.merge({ |
|
|
|
|
|
|
|
app: './openproject-app.js' |
|
|
|
|
|
|
|
}, pluginEntries), |
|
|
|
|
|
|
|
|
|
|
|
output: { |
|
|
|
output: { |
|
|
|
filename: 'openproject-app.bundle.js', |
|
|
|
filename: 'openproject-[name].js', |
|
|
|
path: path.join(__dirname, 'app', 'assets', 'javascripts') |
|
|
|
path: path.join(__dirname, 'app', 'assets', 'javascripts', 'bundles') |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
module: { |
|
|
|
module: { |
|
|
|