Skip to content

Commit

Permalink
underscore: make dep of plugin
Browse files Browse the repository at this point in the history
Etherpad is deprecating underscore but this plugin uses some pretty extensive features/functionality that are harder to migrate to ES6, so let's just require it for this plugin until ES6 equivalents are well adopted.
  • Loading branch information
JohnMcLear committed Mar 3, 2021
1 parent a0372e0 commit 54042ea
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion commentManager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const _ = require('ep_etherpad-lite/static/js/underscore');
const _ = require('underscore');
const db = require('ep_etherpad-lite/node/db/DB');
const log4js = require('ep_etherpad-lite/node_modules/log4js');
const randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const settings = require('ep_etherpad-lite/node/utils/Settings');
const formidable = require('formidable');
const commentManager = require('./commentManager');
const apiUtils = require('./apiUtils');
const _ = require('ep_etherpad-lite/static/js/underscore');
const _ = require('underscore');
const readOnlyManager = require('ep_etherpad-lite/node/db/ReadOnlyManager.js');

let io;
Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
],
"dependencies": {
"cheerio": "^0.22.0",
"formidable": "^1.2.2"
"formidable": "^1.2.2",
"underscore": "*"
},
"devDependencies": {
"eslint": "^7.18.0",
Expand Down
2 changes: 1 addition & 1 deletion static/js/copyPasteEvents.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const _ = require('ep_etherpad-lite/static/js/underscore');
const _ = require('underscore');
const randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
const shared = require('./shared');

Expand Down
2 changes: 1 addition & 1 deletion static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/


const _ = require('ep_etherpad-lite/static/js/underscore');
const _ = require('underscore');
const browser = require('ep_etherpad-lite/static/js/browser');
const commentBoxes = require('ep_comments_page/static/js/commentBoxes');
const commentIcons = require('ep_comments_page/static/js/commentIcons');
Expand Down

0 comments on commit 54042ea

Please sign in to comment.