Skip to content

Controlling Multiple Environments from the CLI? #169

@Daniel-eXeX

Description

@Daniel-eXeX

Hi!

I've been looking through Envied's documentation, and I have a question on setting up multiple environments. According to the docs, you can do the following:

@Envied(path: '.env', name: 'ProductionEnv')
@Envied(path: '.env_debug', name: 'DebugEnv')
final class MultiEnv {
  // Env class code here
}

Earlier in the docs, it also says that you can do the following from the CLI:

dart run build_runner build --define=envied_generator:envied=path=my_other.env

I'd like to set the paths for .env and .env_debug independently from the same build_runner invocation. Is there a way to do this?

(I should note that I have not yet gone through the source code to check if this is a thing - I did look into the builder's Dart docs, but they were largely empty.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions