-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(app generator): add ability to retrieve a build distribution tar…
…get-environment's settings at run-time Replace madlib-hostmapping based solution.
- Loading branch information
Showing
16 changed files
with
473 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
### About target-environment settings | ||
|
||
This directory contains one settings JSON file per each build distribution's target-environment: | ||
|
||
* local (aka developement) | ||
* testing` | ||
* acceptance | ||
* production | ||
|
||
Settings to be determined in such a file include: | ||
|
||
setting | explanation | ||
:--- | :--- | ||
`environment` | The target-environments name (production, acceptance, testing, staging, local, etc). Should really be identical to the settings file's name (excluding the `.json` extension). | ||
`apiBaseUrl` | The base URL of the API to use. | ||
`locales` | A list of available locales. | ||
|
||
Feel free to add further files to this directory as you see fit; for instance `<yourname>.js` for your personal local development configuration. | ||
|
||
Just keep in mind that the [`Gruntfile.coffee`](../Gruntfile.coffee) is tailored towards using the defaults outlined above, and that you would need to supply a | ||
`--target <environment>` argument to the `grunt` command to override that default. | ||
|
||
So, to target a development build distribution to use settings different from `local.json`, f.i. `<yourname>.js`, use | ||
|
||
```sh | ||
grunt --target <yourname> dev` | ||
``` | ||
|
||
To target a production build distribution to use the `acceptance.json` settings instead of `production.json`, use: | ||
|
||
```sh | ||
grunt --target acceptance` | ||
``` | ||
|
||
#### Example settings file | ||
|
||
```json | ||
{ | ||
"environment": "production" | ||
, "apiBaseUrl": "/api" | ||
, "locales": | ||
{ | ||
"en-GB": "English" | ||
, "en-US": "English (US)" | ||
, "nl-NL": "Nederlands" | ||
} | ||
} | ||
``` | ||
|
||
For more detailed information on builds, distributions and target-environments, see the introductory comments included within the | ||
[`Gruntfile.coffee`](../Grunfile.coffee) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"apiBaseUrl": "/api" | ||
, "environment": "acceptance"<% if ( i18n ) { %> | ||
, "locales": | ||
{ | ||
"<%- i18nLocaleDefault %>": "<%- i18nLocaleDefaultLanguage %> (<%- i18nLocaleDefaultRegion %>)" | ||
}<% } %> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"apiBaseUrl": "/api" | ||
, "environment": "local"<% if ( i18n ) { %> | ||
, "locales": | ||
{ | ||
"<%- i18nLocaleDefault %>": "<%- i18nLocaleDefaultLanguage %> (<%- i18nLocaleDefaultRegion %>)" | ||
}<% } %> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"apiBaseUrl": "/api" | ||
, "environment": "production"<% if ( i18n ) { %> | ||
, "locales": | ||
{ | ||
"<%- i18nLocaleDefault %>": "<%- i18nLocaleDefaultLanguage %> (<%- i18nLocaleDefaultRegion %>)" | ||
}<% } %> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"apiBaseUrl": "/api" | ||
, "environment": "testing"<% if ( i18n ) { %> | ||
, "locales": | ||
{ | ||
"<%- i18nLocaleDefault %>": "<%- i18nLocaleDefaultLanguage %> (<%- i18nLocaleDefaultRegion %>)" | ||
}<% } %> | ||
} |
Oops, something went wrong.