mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Use settings.root
to anchor pathnames
This commit is contained in:
parent
f868788417
commit
a45e85a730
3 changed files with 7 additions and 7 deletions
|
@ -1,7 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const npm = require('npm');
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const util = require('util');
|
const util = require('util');
|
||||||
const settings = require('../../utils/Settings');
|
const settings = require('../../utils/Settings');
|
||||||
|
@ -29,7 +28,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
|
||||||
res.end(`var specs_list = ${JSON.stringify(files)};\n`);
|
res.end(`var specs_list = ${JSON.stringify(files)};\n`);
|
||||||
});
|
});
|
||||||
|
|
||||||
const rootTestFolder = path.join(npm.root, '../tests/frontend/');
|
const rootTestFolder = path.join(settings.root, 'src/tests/frontend/');
|
||||||
|
|
||||||
const url2FilePath = (url) => {
|
const url2FilePath = (url) => {
|
||||||
let subPath = url.substr('/tests/frontend'.length);
|
let subPath = url.substr('/tests/frontend'.length);
|
||||||
|
|
|
@ -4,8 +4,7 @@ const languages = require('languages4translatewiki');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const _ = require('underscore');
|
const _ = require('underscore');
|
||||||
const npm = require('npm');
|
const pluginDefs = require('../../static/js/pluginfw/plugin_defs.js');
|
||||||
const plugins = require('../../static/js/pluginfw/plugin_defs.js').plugins;
|
|
||||||
const existsSync = require('../utils/path_exists');
|
const existsSync = require('../utils/path_exists');
|
||||||
const settings = require('../utils/Settings');
|
const settings = require('../utils/Settings');
|
||||||
|
|
||||||
|
@ -38,10 +37,12 @@ const getAllLocales = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// add core supported languages first
|
// add core supported languages first
|
||||||
extractLangs(`${npm.root}/ep_etherpad-lite/locales`);
|
extractLangs(path.join(settings.root, 'src/locales'));
|
||||||
|
|
||||||
// add plugins languages (if any)
|
// add plugins languages (if any)
|
||||||
for (const pluginName in plugins) extractLangs(path.join(npm.root, pluginName, 'locales'));
|
for (const {package: {path: pluginPath}} of Object.values(pluginDefs.plugins)) {
|
||||||
|
extractLangs(path.join(pluginPath, 'locales'));
|
||||||
|
}
|
||||||
|
|
||||||
// Build a locale index (merge all locale data other than user-supplied overrides)
|
// Build a locale index (merge all locale data other than user-supplied overrides)
|
||||||
const locales = {};
|
const locales = {};
|
||||||
|
|
|
@ -32,7 +32,7 @@ const log4js = require('log4js');
|
||||||
|
|
||||||
const logger = log4js.getLogger('Minify');
|
const logger = log4js.getLogger('Minify');
|
||||||
|
|
||||||
const ROOT_DIR = path.normalize(`${__dirname}/../../static/`);
|
const ROOT_DIR = path.join(settings.root, 'src/static/');
|
||||||
|
|
||||||
const threadsPool = new Threads.Pool(() => Threads.spawn(new Threads.Worker('./MinifyWorker')), 2);
|
const threadsPool = new Threads.Pool(() => Threads.spawn(new Threads.Worker('./MinifyWorker')), 2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue