Overriding the default build environment
See original GitHub issueI’m submitting a feature request
Current behavior:
As you can see on https://github.com/aurelia/cli/blob/master/lib/cli-options.js#L17 from that last bit, aurelia cli assumes that when no environment is set, it automatically falls back to dev
.
- What is the expected behavior?
If there was a way to configure this default, or at the very least just be able to pass a fallback environment like CLIOptions.getEnvironment('defaultenv')
, that would be great.
Or perhaps there could be a key on aurelia.json to specify this default?
- What is the motivation / use case for changing the behavior?
As it currently is, I cannot customize my environments the way I want it. Simply put, I use only two environments: debug
and release
. I don’t want to call them “dev” and “prod”, as that isn’t really an accurate name for my case.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Knowledge Base:Overriding environment variables per package
Synopsis. The default environment variables during package builds are declared in /etc/portage/make.conf, but sometimes it is desirable to ...
Read more >Override a Service Configuration in an Environment
From the Environment, go to the Service Configuration Overrides section, and click Add Configuration Overrides. The Service Configuration ...
Read more >Cannot override default environment variables for build ...
I am trying to add (and override) the below environment variables (last 3 variables defined in screen below):.
Read more >Overriding ASP Net Core settings with Environment ...
Environment variables can be overridden using environment variables set in the Docker file ... Docker run -e "Logging:LogLevel:Default=Info" my-application.
Read more >How to override environment variables through the Build ...
Probably the easiest solution is to do it with a build step (e.g. with a Script step). Steps and step outputs are processed...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah excellent, i’m having a look today or in the weekend
aurelia_project/environments/
files can be renamed todebug.js
andrelease.js
(or ts). Unfortunately there is no changeable default option for env.However, user can use npm scripts in package.json to avoid manual setting of env in command line.
We are unlikely to add more features to existing aurelia-cli. Sorry.