mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
checkPlugin: Improve readability of files
assignment
This commit is contained in:
parent
b546867adb
commit
b50c6d07d4
1 changed files with 5 additions and 8 deletions
|
@ -136,17 +136,14 @@ fs.readdir(pluginPath, (err, rootFiles) => {
|
||||||
return console.log(`Unable to scan directory: ${err}`);
|
return console.log(`Unable to scan directory: ${err}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// rewriting files to lower case
|
|
||||||
const files = [];
|
|
||||||
|
|
||||||
// some files we need to know the actual file name. Not compulsory but might help in the future.
|
// some files we need to know the actual file name. Not compulsory but might help in the future.
|
||||||
let readMeFileName;
|
let readMeFileName;
|
||||||
let repository;
|
let repository;
|
||||||
|
const files = rootFiles.map((f) => {
|
||||||
for (let i = 0; i < rootFiles.length; i++) {
|
const fl = f.toLowerCase();
|
||||||
if (rootFiles[i].toLowerCase().includes('readme')) readMeFileName = rootFiles[i];
|
if (fl.includes('readme')) readMeFileName = f;
|
||||||
files.push(rootFiles[i].toLowerCase());
|
return fl;
|
||||||
}
|
});
|
||||||
|
|
||||||
if (!files.includes('.git')) throw new Error('No .git folder, aborting');
|
if (!files.includes('.git')) throw new Error('No .git folder, aborting');
|
||||||
prepareRepo();
|
prepareRepo();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue