Function
outputEnvFile
(folder: string, fileName: string, envCfg: Record<string, string>, varName: string)
Source from the content-addressed store, hash-verified
| 46 | } |
| 47 | |
| 48 | export function outputEnvFile(folder: string, fileName: string, envCfg: Record<string, string>, varName: string) { |
| 49 | shell.mkdir('-p', './build') |
| 50 | console.info('Setting the following environment variables:') |
| 51 | console.info(envCfg) |
| 52 | writeFileSync(`${folder}/${fileName}`, `window.${varName} = ${JSON.stringify(envCfg, null, 2)}`) |
| 53 | } |
Tested by
no test coverage detected