Skip to content

feat(@angular/cli): use environmentSource key for environments#4705

Merged
filipesilva merged 3 commits into
angular:masterfrom
filipesilva:environment-source
Feb 16, 2017
Merged

feat(@angular/cli): use environmentSource key for environments#4705
filipesilva merged 3 commits into
angular:masterfrom
filipesilva:environment-source

Conversation

@filipesilva
Copy link
Copy Markdown
Contributor

@filipesilva filipesilva commented Feb 14, 2017

Heavily based on @jsanchezgarcia work in #4476.

Fix #3857

BREAKING CHANGE:

A new environmentSource entry replaces the previous source entry inside environments.

To migrate the code follow the example below:

Before:

"environments": {
  "source": "environments/environment.ts",
  "dev": "environments/environment.ts",
  "prod": "environments/environment.prod.ts"
}

After:

"environmentSource": "environments/environment.ts",
"environments": {
  "dev": "environments/environment.ts",
  "prod": "environments/environment.prod.ts"
}

@filipesilva
Copy link
Copy Markdown
Contributor Author

An alias should be added in

Heavily based on @jsanchezgarcia work in angular#4476.

Fix angular#3857

BREAKING CHANGE:

A new environmentSource entry replaces the previous source entry inside environments.

To migrate the code follow the example below:

Before:
```
"environments": {
  "source": "environments/environment.ts",
  "dev": "environments/environment.ts",
  "prod": "environments/environment.prod.ts"
}
```

After:
```
"environmentSource": "environments/environment.ts",
  "environments": {
  "dev": "environments/environment.ts",
  "prod": "environments/environment.prod.ts"
}
```
if (appConfig.environments) {
if (!('source' in appConfig.environments)) {
throw new SilentError(`Environment configuration does not contain "source" entry.`);
if (!appConfig.environmentSource) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please verify if environment.source is set here and explain to the user the change s/he needs to make.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@filipesilva filipesilva merged commit 16bfdf0 into angular:master Feb 16, 2017
@filipesilva filipesilva deleted the environment-source branch February 16, 2017 12:09
asnowwolf pushed a commit to asnowwolf/angular-cli that referenced this pull request Apr 12, 2017
…ar#4705)

Heavily based on @jsanchezgarcia work in angular#4476.

Fix angular#3857

BREAKING CHANGE:

A new environmentSource entry replaces the previous source entry inside environments.

To migrate the code follow the example below:

Before:
```
"environments": {
  "source": "environments/environment.ts",
  "dev": "environments/environment.ts",
  "prod": "environments/environment.prod.ts"
}
```

After:
```
"environmentSource": "environments/environment.ts",
  "environments": {
  "dev": "environments/environment.ts",
  "prod": "environments/environment.prod.ts"
}
```
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace source in environments with separate environmentDefault entry

4 participants