* Gets environment variables needed in the browser. * @returns {object} environment variables key: values
()
| 230 | * @returns {object} environment variables key: values |
| 231 | */ |
| 232 | function getEnvVarsAsObj () { |
| 233 | const obj = { modulesDir: `${global.config.foreignModulesDir}`, defaultModulesDir: `${global.config.defaultModulesDir}`, customCss: `${global.config.customCss}` }; |
| 234 | if (process.env.MM_MODULES_DIR) { |
| 235 | obj.modulesDir = process.env.MM_MODULES_DIR.replace(`${global.root_path}/`, ""); |
| 236 | } |
| 237 | if (process.env.MM_CUSTOMCSS_FILE) { |
| 238 | obj.customCss = process.env.MM_CUSTOMCSS_FILE.replace(`${global.root_path}/`, ""); |
| 239 | } |
| 240 | |
| 241 | return obj; |
| 242 | } |
| 243 | |
| 244 | /** |
| 245 | * Gets environment variables needed in the browser. |
no outgoing calls
no test coverage detected