From b0c9dbd6479d821ba10010368cb8cde898b5542e Mon Sep 17 00:00:00 2001 From: Julien Gautier Date: Wed, 4 Oct 2023 14:15:19 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20et=20mise=20=C3=A0=20jour=20de=20config?= =?UTF-8?q?uration=20d'environnement=20(local=20et=20development)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- angular.json | 32 ++++++++++++++++++++++----- package.json | 4 +++- src/environments/environment.local.ts | 11 +++++++++ 3 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 src/environments/environment.local.ts diff --git a/angular.json b/angular.json index e23797e..a9b01d4 100644 --- a/angular.json +++ b/angular.json @@ -68,12 +68,12 @@ ] }, "development": { - "optimization": true, - "sourceMap": false, - "namedChunks": false, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true, + "optimization": false, + "sourceMap": true, + "namedChunks": true, + "extractLicenses": false, + "vendorChunk": true, + "buildOptimizer": false, "fileReplacements": [ { "replace": "src/environments/environment.ts", @@ -86,6 +86,26 @@ "maximumWarning": "6kb" } ] + }, + "local": { + "optimization": false, + "sourceMap": true, + "namedChunks": true, + "extractLicenses": false, + "vendorChunk": true, + "buildOptimizer": false, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.local.ts" + } + ], + "budgets": [ + { + "type": "anyComponentStyle", + "maximumWarning": "6kb" + } + ] } }, "defaultConfiguration": "production" diff --git a/package.json b/package.json index a7428e4..fbd1bf1 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,11 @@ "version": "1.0.0", "scripts": { "ng": "ng", - "start": "ng serve", + "start": "ng serve --configuration development", "build": "ng build", "watch": "ng build --watch --configuration development", + "local": "ng build --watch --configuration local", + "lint": "ng lint", "test": "ng test" }, "private": true, diff --git a/src/environments/environment.local.ts b/src/environments/environment.local.ts new file mode 100644 index 0000000..35ee638 --- /dev/null +++ b/src/environments/environment.local.ts @@ -0,0 +1,11 @@ +export const environment = { + production: false, + api_url: 'http://localhost:3200/api', //'https://api.rampeur.com/api' + api_key: '9f5a9b80a39b4788be2f12941b766aba', + use_api_key: true, + refresh_interval: 30000, + couchdbUrl: 'http://couchdb.unespace.com', + couchdbDatabase: 'headupdb', + couchdbDesign: 'headup_app', + couchdbCredential: 'cmFtcGV1cjpES3hwMjRQUw==' +};