move underscore to its old place and remove unnecessary packages (#4876)

This commit is contained in:
webzwo0i 2021-02-27 06:10:53 +01:00 committed by GitHub
parent c0ec28f781
commit 15dba7d886
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 7 additions and 17 deletions

View file

@ -146,14 +146,6 @@ const minify = async (req, res) => {
filename = 'js/vendors/jquery.js'; filename = 'js/vendors/jquery.js';
} }
// Backward compatibility for plugins that were written when underscore lived at
// src/static/js/underscore.js.
if (['js/underscore.js', 'plugins/ep_etherpad-lite/static/js/underscore.js']
.indexOf(filename) !== -1) {
logger.warn(`request for deprecated underscore path: ${filename}`);
filename = 'js/vendors/underscore.js';
}
/* Handle static files for plugins/libraries: /* Handle static files for plugins/libraries:
paths like "plugins/ep_myplugin/static/js/test.js" paths like "plugins/ep_myplugin/static/js/test.js"
are rewritten into ROOT_PATH_OF_MYPLUGIN/static/js/test.js, are rewritten into ROOT_PATH_OF_MYPLUGIN/static/js/test.js,

View file

@ -72,7 +72,7 @@
, "vendors/jquery.js" , "vendors/jquery.js"
, "rjquery.js" , "rjquery.js"
, "$async.js" , "$async.js"
, "vendors/underscore.js" , "underscore.js"
, "$underscore.js" , "$underscore.js"
, "$underscore/underscore.js" , "$underscore/underscore.js"
, "security.js" , "security.js"
@ -82,6 +82,4 @@
, "pluginfw/shared.js" , "pluginfw/shared.js"
, "pluginfw/hooks.js" , "pluginfw/hooks.js"
] ]
, "jquery.js": ["jquery.js"]
, "underscore.js": ["underscore.js"]
} }

View file

@ -2,7 +2,7 @@
const Changeset = require('./Changeset'); const Changeset = require('./Changeset');
const ChangesetUtils = require('./ChangesetUtils'); const ChangesetUtils = require('./ChangesetUtils');
const _ = require('./vendors/underscore'); const _ = require('./underscore');
const lineMarkerAttribute = 'lmkr'; const lineMarkerAttribute = 'lmkr';

View file

@ -28,7 +28,7 @@ const AttribPool = require('./AttributePool');
const Changeset = require('./Changeset'); const Changeset = require('./Changeset');
const linestylefilter = require('./linestylefilter').linestylefilter; const linestylefilter = require('./linestylefilter').linestylefilter;
const colorutils = require('./colorutils').colorutils; const colorutils = require('./colorutils').colorutils;
const _ = require('./vendors/underscore'); const _ = require('./underscore');
const hooks = require('./pluginfw/hooks'); const hooks = require('./pluginfw/hooks');
// These parameters were global, now they are injected. A reference to the // These parameters were global, now they are injected. A reference to the

View file

@ -23,7 +23,7 @@
// These parameters were global, now they are injected. A reference to the // These parameters were global, now they are injected. A reference to the
// Timeslider controller would probably be more appropriate. // Timeslider controller would probably be more appropriate.
const _ = require('./vendors/underscore'); const _ = require('./underscore');
const padmodals = require('./pad_modals').padmodals; const padmodals = require('./pad_modals').padmodals;
const colorutils = require('./colorutils').colorutils; const colorutils = require('./colorutils').colorutils;

View file

@ -24,7 +24,7 @@
const Security = require('./security'); const Security = require('./security');
const hooks = require('./pluginfw/hooks'); const hooks = require('./pluginfw/hooks');
const _ = require('./vendors/underscore'); const _ = require('./underscore');
const lineAttributeMarker = require('./linestylefilter').lineAttributeMarker; const lineAttributeMarker = require('./linestylefilter').lineAttributeMarker;
const noop = () => {}; const noop = () => {};

View file

@ -23,7 +23,7 @@
*/ */
const Ace2Common = require('./ace2_common'); const Ace2Common = require('./ace2_common');
const _ = require('./vendors/underscore'); const _ = require('./underscore');
const noop = Ace2Common.noop; const noop = Ace2Common.noop;

View file

@ -23,7 +23,7 @@
*/ */
const Changeset = require('./Changeset'); const Changeset = require('./Changeset');
const _ = require('./vendors/underscore'); const _ = require('./underscore');
const undoModule = (() => { const undoModule = (() => {
const stack = (() => { const stack = (() => {