aboutsummaryrefslogtreecommitdiff
path: root/views/script/credits_libs.js
blob: 26ee36bbd8de20be7afe4c64a9e1745b748b9e72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Object.keys(process.versions).forEach((e) => {
    v = process.versions[e];
    document.write("<div>" + e.substr(0, 1).toUpperCase() + e.substr(1) + " contributors</div>");
})
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("<div>" + j.author + "</div>");
        } else {
            document.write("<div>" + j.name.substr(0, 1).toUpperCase() + j.name.substr(1) + " authors</div>");
        }
    }
})