diff options
Diffstat (limited to 'views/script/credits_libs.js')
-rw-r--r-- | views/script/credits_libs.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/views/script/credits_libs.js b/views/script/credits_libs.js new file mode 100644 index 0000000..9e2f21a --- /dev/null +++ b/views/script/credits_libs.js @@ -0,0 +1,15 @@ +Object.keys(process.versions).forEach((e) => { + v = process.versions[e]; + document.write(e.substr(0, 1).toUpperCase() + e.substr(1) + " contributors<br>"); +}) +dirs = require('fs').readdirSync("./node_modules"); +dirs.forEach((dir) => { + if (!dir.startsWith(".") && !dir.startsWith("@") && dir !== "electron") { + j = JSON.parse(require('fs').readFileSync("./node_modules/" + dir + "/package.json").toString()); + if (typeof j.author === "string") { + document.write(j.author + "<br>"); + } else { + document.write(j.name.substr(0, 1).toUpperCase() + j.name.substr(1) + " authors<br>"); + } + } +})
\ No newline at end of file |