|
|
|
@ -49,22 +49,7 @@ var browsersList = JSON.stringify(_.filter(browsersListConfig.split('\n'), funct |
|
|
|
|
return entry && entry.charAt(0) !== '#'; |
|
|
|
|
})); |
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
|
context: __dirname + '/app', |
|
|
|
|
|
|
|
|
|
entry: _.merge({ |
|
|
|
|
'global': './global.js', |
|
|
|
|
'core-app': './openproject-app.js' |
|
|
|
|
}, pluginEntries), |
|
|
|
|
|
|
|
|
|
output: { |
|
|
|
|
filename: 'openproject-[name].js', |
|
|
|
|
path: path.join(__dirname, '..', 'app', 'assets', 'javascripts', 'bundles'), |
|
|
|
|
publicPath: '/assets/bundles/' |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
module: { |
|
|
|
|
loaders: [ |
|
|
|
|
var loaders = [ |
|
|
|
|
{ test: /[\/]angular\.js$/, loader: 'exports?angular' }, |
|
|
|
|
{ test: /[\/]jquery\.js$/, loader: 'expose?jQuery' }, |
|
|
|
|
{ test: /[\/]moment\.js$/, loader: 'expose?moment' }, |
|
|
|
@ -80,13 +65,41 @@ module.exports = { |
|
|
|
|
{ test: /\.png$/, loader: 'url-loader?limit=100000&mimetype=image/png' }, |
|
|
|
|
{ test: /\.gif$/, loader: 'file-loader' }, |
|
|
|
|
{ test: /\.jpg$/, loader: 'file-loader' }, |
|
|
|
|
{ test: /js-[\w|-]{2,5}\.yml$/, loader: 'json!yaml' }, |
|
|
|
|
{ |
|
|
|
|
test: /\.html$/, |
|
|
|
|
{ test: /js-[\w|-]{2,5}\.yml$/, loader: 'json!yaml' } |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
for (var k in pathConfig.pluginNamesPaths) { |
|
|
|
|
if (pathConfig.pluginNamesPaths.hasOwnProperty(k)) { |
|
|
|
|
loaders.push({ |
|
|
|
|
test: new RegExp('templates/plugin-' + k.replace(/^openproject\-/, '') + '/.*\.html$'), |
|
|
|
|
loader: 'ngtemplate?module=openproject.templates&relativeTo=' + |
|
|
|
|
path.join(pathConfig.pluginNamesPaths[k], 'frontend', 'app') + '!html' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
loaders.push({ |
|
|
|
|
test: /^((?!templates\/plugin).)*\.html$/, |
|
|
|
|
loader: 'ngtemplate?module=openproject.templates&relativeTo=' + |
|
|
|
|
path.resolve(__dirname, './app') + '!html' |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
|
context: __dirname + '/app', |
|
|
|
|
|
|
|
|
|
entry: _.merge({ |
|
|
|
|
'global': './global.js', |
|
|
|
|
'core-app': './openproject-app.js' |
|
|
|
|
}, pluginEntries), |
|
|
|
|
|
|
|
|
|
output: { |
|
|
|
|
filename: 'openproject-[name].js', |
|
|
|
|
path: path.join(__dirname, '..', 'app', 'assets', 'javascripts', 'bundles'), |
|
|
|
|
publicPath: '/assets/bundles/' |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
module: { |
|
|
|
|
loaders: loaders |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
resolve: { |
|
|
|
|