require is not defined... why not
parent
e5abd185b5
commit
ef8dda0553
|
@ -1,13 +1,27 @@
|
||||||
|
define(
|
||||||
|
[
|
||||||
|
'languages4translatewiki',
|
||||||
|
'fs',
|
||||||
|
'path',
|
||||||
|
'underscore',
|
||||||
|
'npm',
|
||||||
|
'ep_etherpad-lite/static/js/pluginfw/plugins',
|
||||||
|
'semver'
|
||||||
|
],
|
||||||
|
function(languages, fs, path, _, npm, plugins, semver){
|
||||||
|
|
||||||
|
var exports = {};
|
||||||
|
|
||||||
var languages = require('languages4translatewiki')
|
var languages = require('languages4translatewiki')
|
||||||
, fs = require('fs')
|
, fs = require('fs')
|
||||||
, path = require('path')
|
, path = require('path')
|
||||||
, _ = require('underscore')
|
, _ = require('underscore')
|
||||||
, npm = require('npm')
|
, npm = require('npm')
|
||||||
, plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins.js').plugins
|
, plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins.js')
|
||||||
, semver = require('semver')
|
, semver = require('semver');
|
||||||
, existsSync = semver.gt(process.version, '0.7.0') ? fs.existsSync : path.existsSync
|
|
||||||
;
|
|
||||||
|
|
||||||
|
var existsSync = semver.gt(process.version, '0.7.0') ? fs.existsSync : path.existsSync
|
||||||
|
plugins = plugins.plugins;
|
||||||
|
|
||||||
// returns all existing messages merged together and grouped by langcode
|
// returns all existing messages merged together and grouped by langcode
|
||||||
// {es: {"foo": "string"}, en:...}
|
// {es: {"foo": "string"}, en:...}
|
||||||
|
@ -102,3 +116,4 @@ exports.expressCreateServer = function(n, args) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
|
@ -88,13 +88,26 @@ as far as the left-most node_modules folder.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
define(
|
||||||
|
[
|
||||||
|
'npm',
|
||||||
|
'graceful-fs',
|
||||||
|
'path',
|
||||||
|
'asyncMap',
|
||||||
|
'semver',
|
||||||
|
'log'
|
||||||
|
],
|
||||||
|
function (npm, fs, path, asyncMap, semver, log) {
|
||||||
|
|
||||||
var npm = require("npm/lib/npm.js")
|
var npm = require("npm/lib/npm.js")
|
||||||
, fs = require("graceful-fs")
|
, fs = require("graceful-fs")
|
||||||
, path = require("path")
|
, path = require("path")
|
||||||
, asyncMap = require("slide").asyncMap
|
, asyncMap = require("slide")
|
||||||
, semver = require("semver")
|
, semver = require("semver")
|
||||||
, log = require("log4js").getLogger('pluginfw')
|
, log = require("log4js");
|
||||||
|
|
||||||
|
asyncMap = asyncMap.asyncMap;
|
||||||
|
log = log.getLogger('pluginfw');
|
||||||
|
|
||||||
function readJson(file, callback) {
|
function readJson(file, callback) {
|
||||||
fs.readFile(file, function(er, buf) {
|
fs.readFile(file, function(er, buf) {
|
||||||
|
@ -335,3 +348,5 @@ if (module === require.main) {
|
||||||
return map
|
return map
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue