MCPcopy Create free account
hub / github.com/codegowhere/react-inject-env / replaceFilesInDir

Function replaceFilesInDir

src/utils/File.ts:41–46  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

39}
40
41export function replaceFilesInDir(dir: string) {
42 const envCfg = { ...retrieveDotEnvCfg(), ...retrieveReactEnvCfg() }
43 console.info('Injecting the following environment variables:')
44 console.info(envCfg)
45 replaceFile(dir, envCfg)
46}
47
48export function outputEnvFile(folder: string, fileName: string, envCfg: Record<string, string>, varName: string) {
49 shell.mkdir('-p', './build')

Callers 1

onExecuteMethod · 0.90

Calls 3

retrieveDotEnvCfgFunction · 0.90
retrieveReactEnvCfgFunction · 0.90
replaceFileFunction · 0.85

Tested by

no test coverage detected