INNER CODE UNIT · JavaScript

loadEnv

nullstack/nullstack · scripts/index.js:21

function loadEnv(name) {
  let envPath = '.env'
  if (name) {
    envPath += `.${name}`
  }
  dotenv.config({ path: envPath })
}

function clearDir() {
  if (existsSync(path.join(process.cwd(), '.development'))) {
    const tempFiles = readdirSync(path.join(process.cwd(), '.development'))
    for (const file of tempFiles) {
      if (file !== '.cache') {
        unlinkSync(path.join(process.cwd(), '.development', file))
      }
    }
  }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…