How to use the read-config-file.loadEnv function in read-config-file

To help you get started, we’ve selected a few read-config-file examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electron-userland / electron-builder / packages / electron-builder / src / cli / cli.ts View on Github external
return (args: any) => {
    checkIsOutdated()
    loadEnv(path.join(process.cwd(), "electron-builder.env"))
      .then(() => task(args))
      .catch(error => {
        process.exitCode = 1
        // https://github.com/electron-userland/electron-builder/issues/2940
        process.on("exit", () => process.exitCode = 1)
        if (error instanceof InvalidConfigurationError) {
          log.error(null, error.message)
        }
        else if (!(error instanceof ExecError) || !error.alreadyLogged) {
          log.error({stackTrace: error.stack}, error.message)
        }
      })
  }
}

read-config-file

Read configuration file in various formats:

MIT
Latest version published 6 months ago

Package Health Score

67 / 100
Full package analysis

Similar packages