mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
bin scripts: Promisify npm.load
This commit is contained in:
parent
92cd2cc760
commit
efdcaae526
7 changed files with 39 additions and 23 deletions
|
@ -12,12 +12,14 @@ if (process.argv.length !== 3) throw new Error('Use: node bin/checkPadDeltas.js
|
|||
// get the padID
|
||||
const padId = process.argv[2];
|
||||
|
||||
// load and initialize NPM;
|
||||
const expect = require('../tests/frontend/lib/expect');
|
||||
const diff = require('ep_etherpad-lite/node_modules/diff');
|
||||
const npm = require('ep_etherpad-lite/node_modules/npm');
|
||||
const util = require('util');
|
||||
|
||||
(async () => {
|
||||
await util.promisify(npm.load)({});
|
||||
|
||||
npm.load({}, async () => {
|
||||
// initialize database
|
||||
require('ep_etherpad-lite/node/utils/Settings');
|
||||
const db = require('ep_etherpad-lite/node/db/DB');
|
||||
|
@ -102,4 +104,4 @@ npm.load({}, async () => {
|
|||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue