MCPcopy Create free account
hub / github.com/code-forge-io/react-router-devtools / getEnvInfo

Function getEnvInfo

docs/scripts/setup.ts:10–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8const log = (message: string) => console.log(chalk.green(message))
9
10const getEnvInfo = () => {
11 // Gets the environment from the command line arguments if set, otherwise defaults to dev
12 const env = process.argv.find((arg) => ENVIRONMENTS.includes(arg)) ?? ""
13 // Sets the environment name to be console logged for info
14 const envName = env !== "" ? env : "dev"
15 // Allows for reading from .env .env.prod .env.stage etc
16 const path = `.env${env ? `.${env}` : ""}`
17 return { env, envName, path }
18}
19
20const setupEnv = () => {
21 const { envName, path } = getEnvInfo()

Callers 2

setupEnvFunction · 0.85
confirmRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…