mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Create Webpack entry points for each plugin
User Story # #5697 Signed-off-by: Alex Coles <alex@alexbcoles.com>
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@
|
||||
/backup
|
||||
/.project
|
||||
/.loadpath
|
||||
/app/assets/javascripts/openproject-app.bundle.js*
|
||||
/app/assets/javascripts/bundles/*.js*
|
||||
/config/additional_environment.rb
|
||||
/config/configuration.yml
|
||||
/config/database.yml
|
||||
|
||||
@@ -54,7 +54,8 @@
|
||||
//= require versions
|
||||
//= require_tree ./specific
|
||||
|
||||
//= require ./openproject-app.bundle
|
||||
//= require ./bundles/openproject-app
|
||||
//= require_tree ./bundles
|
||||
|
||||
//source: http://stackoverflow.com/questions/8120065/jquery-and-prototype-dont-work-together-with-array-prototype-reverse
|
||||
if (typeof []._reverse == 'undefined') {
|
||||
|
||||
@@ -59,6 +59,7 @@ var TranslationsPlugin = {
|
||||
}
|
||||
};
|
||||
|
||||
exports.pluginNamesPaths = OpenProjectPlugins.pluginNamesPaths();
|
||||
exports.pluginDirectories = OpenProjectPlugins.pluginDirectories();
|
||||
exports.translationsPluginLocales = TranslationsPlugin.findLocaleFiles();
|
||||
exports.translationsPluginPath = TranslationsPlugin.findPluginPath();
|
||||
|
||||
+11
-3
@@ -1,15 +1,23 @@
|
||||
var webpack = require('webpack'),
|
||||
path = require('path'),
|
||||
_ = require('lodash'),
|
||||
pathConfig = require('./config/rails-plugins.conf');
|
||||
|
||||
var pluginEntries = _.reduce(pathConfig.pluginNamesPaths, function(entries, path, name) {
|
||||
entries[name.replace(/^openproject\-/, '')] = name;
|
||||
return entries;
|
||||
}, {});
|
||||
|
||||
module.exports = {
|
||||
context: __dirname + '/app/assets/javascripts/angular',
|
||||
|
||||
entry: './openproject-app.js',
|
||||
entry: _.merge({
|
||||
app: './openproject-app.js'
|
||||
}, pluginEntries),
|
||||
|
||||
output: {
|
||||
filename: 'openproject-app.bundle.js',
|
||||
path: path.join(__dirname, 'app', 'assets', 'javascripts')
|
||||
filename: 'openproject-[name].js',
|
||||
path: path.join(__dirname, 'app', 'assets', 'javascripts', 'bundles')
|
||||
},
|
||||
|
||||
module: {
|
||||
|
||||
Reference in New Issue
Block a user