Files
simplelogin-browser-extension/scripts/generateBuildConfig.js
T
2022-08-01 09:49:58 +02:00

22 lines
562 B
JavaScript

const fs = require('fs');
const path = require('path');
const PATH = path.join(__dirname, '../src', 'popup', 'buildConfig.json');
const isLoginWithProtonEnabled = () => {
const enableLoginWithProton = process.env.ENABLE_LOGIN_WITH_PROTON;
if (enableLoginWithProton == undefined || enableLoginWithProton === 'true') {
return true;
}
return false;
};
const config = {
features: {
loginWithProtonEnabled: isLoginWithProtonEnabled()
},
buildTime: new Date().getTime()
};
fs.writeFileSync(PATH, JSON.stringify(config, null, 2));