question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Overriding the default build environment

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
JeroenVinkecommented, Feb 2, 2018

Ah excellent, i’m having a look today or in the weekend

1reaction
3cpcommented, Jun 1, 2022

aurelia_project/environments/ files can be renamed to debug.js and release.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.

"build": "au build --env release"
"build:debug": "au build --env debug"
"start": "au start --env debug"

We are unlikely to add more features to existing aurelia-cli. Sorry.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found