Samuel Philipp
a1b60ba2be
All checks were successful
Build and Deploy Website / Build Website (push) Has been skipped
Build and Deploy Website / Deploy Website (push) Has been skipped
Build and Deploy Website / Build Dev Website (push) Successful in 1m10s
Build and Deploy Website / Deploy Dev Website (push) Successful in 1m51s
13 lines
475 B
JavaScript
13 lines
475 B
JavaScript
const fs = require("fs");
|
|
const site = require("./global.json");
|
|
|
|
site.buildName = process.env.BUILD || 'prod';
|
|
if (fs.existsSync(`${__dirname}/global.${site.buildName}.json`)) {
|
|
Object.assign(site, require(`./global.${site.buildName}.json`));
|
|
}
|
|
site.buildTime = new Date().toISOString();
|
|
site.lang = process.env.LANGUAGE || 'en';
|
|
site.language = site.languages.find(l => l.code === site.lang);
|
|
site.strings = require(`./i18n/${site.lang}.json`);
|
|
|
|
module.exports = site;
|