mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
tests: reorganize some files, because we are going to copy & paste them.
In the following commits Pierre is going to copy & modify some files. This commit prepares the source files in order to minimize those differences, so we can re-unify them as soon as possible. No functional changes.
This commit is contained in:
parent
5bcc5a3be0
commit
fe0cf4bdb0
2 changed files with 14 additions and 12 deletions
|
@ -1,13 +1,15 @@
|
|||
var jsonminify = require(__dirname+"/../../src/node_modules/jsonminify");
|
||||
const fs = require('fs');
|
||||
|
||||
function loadSettings(){
|
||||
var settingsStr = fs.readFileSync(__dirname+"/../../settings.json").toString();
|
||||
// try to parse the settings
|
||||
var settings;
|
||||
try {
|
||||
if(settingsStr) {
|
||||
settingsStr = jsonminify(settingsStr).replace(",]","]").replace(",}","}");
|
||||
return JSON.parse(settingsStr);
|
||||
var settings = JSON.parse(settingsStr);
|
||||
|
||||
return settings;
|
||||
}
|
||||
}catch(e){
|
||||
console.error("whoops something is bad with settings");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue