mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
parent
079fdf0f38
commit
1ebbcd2f30
1 changed files with 4 additions and 1 deletions
|
@ -2,9 +2,12 @@ var plugins = require("ep_etherpad-lite/static/js/pluginfw/plugins");
|
||||||
var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");
|
var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");
|
||||||
var npm = require("npm");
|
var npm = require("npm");
|
||||||
|
|
||||||
var withNpm = function (npmfn, cb) {
|
var npmIsLoaded = false;
|
||||||
|
var withNpm = function (npmfn) {
|
||||||
|
if(npmIsLoaded) return npmfn();
|
||||||
npm.load({}, function (er) {
|
npm.load({}, function (er) {
|
||||||
if (er) return cb(er);
|
if (er) return cb(er);
|
||||||
|
npmIsLoaded = true;
|
||||||
npm.on("log", function (message) {
|
npm.on("log", function (message) {
|
||||||
console.log('npm: ',message)
|
console.log('npm: ',message)
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue