Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(environment): add test-server config (DSP-1650) #443

Merged
merged 2 commits into from May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 additions & 0 deletions angular.json
Expand Up @@ -71,6 +71,32 @@
"maximumWarning": "6kb"
}
]
},
"test-server": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.test-server.ts"
}
],
"optimization": false,
"sourceMap": true,
"namedChunks": false,
"aot": true,
"extractLicenses": false,
"vendorChunk": false,
"buildOptimizer": false,
"budgets": [
{
"type": "initial",
"maximumWarning": "8mb",
"maximumError": "8mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
}
}
},
Expand All @@ -82,6 +108,9 @@
"configurations": {
"production": {
"browserTarget": "dsp-app:build:production"
},
"test-server": {
"browserTarget": "dsp-app:build:test-server"
}
}
},
Expand Down Expand Up @@ -140,6 +169,9 @@
"configurations": {
"production": {
"devServerTarget": "dsp-app:serve:production"
},
"test-server": {
"devServerTarget": "dsp-app:serve:test-server"
}
}
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
"start-with-test-server": "ng serve --configuration=test-server",
"lint-ci": "eslint --color -c .eslintrc.js --ext .ts ./src/app",
"lint-local": "eslint --color --fix -c .eslintrc.js --ext .ts ./src/app",
"e2e": "ng e2e",
Expand Down
8 changes: 8 additions & 0 deletions src/config/config.test-server.json
@@ -0,0 +1,8 @@
{
"apiProtocol": "https",
"apiHost": "api.test.dasch.swiss",
"apiPort": 443,
"apiPath": "",
"jsonWebToken": "",
"logErrors": true
}
19 changes: 19 additions & 0 deletions src/environments/environment.test-server.ts
@@ -0,0 +1,19 @@
/*
* This file can be replaced during build by using the `fileReplacements` array.
* `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
* The list of file replacements can be found in `angular.json`.
*/

export const environment = {
name: 'test-server',
production: false
};

/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.