diff --git a/Common-UI b/Common-UI index d12389e2..840fd979 160000 --- a/Common-UI +++ b/Common-UI @@ -1 +1 @@ -Subproject commit d12389e2e433de99af585fef88d452ea137625e3 +Subproject commit 840fd9792f07ca75723ad6b2a2e9f4d35969d416 diff --git a/angular.json b/angular.json index 49b02536..53f378fa 100644 --- a/angular.json +++ b/angular.json @@ -52,8 +52,13 @@ } ], "outputHashing": "all", - "optimization": true - + "optimization": true, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ] }, "development": { "buildOptimizer": false, @@ -61,7 +66,13 @@ "vendorChunk": true, "extractLicenses": false, "sourceMap": true, - "namedChunks": true + "namedChunks": true, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ] }, "ci": { "budgets": [ diff --git a/package.json b/package.json index bde9f61a..2bb8c1ab 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,10 @@ "test": "ng test", "lint": "ng lint", "prepare": "husky install", - "build-dev": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=development --aot", - "build-prod": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=production --aot", - "build-ci": "chmod +x ./scripts/*.js && ./scripts/ci-prebuild.js && node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=ci --aot", - "build-test": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=test --aot" + "build-dev": "(test -f src/environments/environment.ts || touch src/environments/environment.ts) && node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=development --aot", + "build-prod": "(test -f src/environments/environment.ts || touch src/environments/environment.ts) && node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=production --aot", + "build-ci": "(test -f src/environments/environment.ts || touch src/environments/environment.ts) && chmod +x ./scripts/*.js && ./scripts/ci-prebuild.js && node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=ci --aot", + "build-test": "(test -f src/environments/environment.ts || touch src/environments/environment.ts) && node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=test --aot" }, "lint-staged": { "src/**/*.{ts,html}": [ diff --git a/scripts/ci-prebuild.js b/scripts/ci-prebuild.js index 2a185f17..93c910ba 100644 --- a/scripts/ci-prebuild.js +++ b/scripts/ci-prebuild.js @@ -39,7 +39,9 @@ const environmentTemplate = fs.readFileSync( const defaultEnvValues = { COMMON_API_BASE: '', - ADMIN_API_BASE: '' + ADMIN_API_BASE: '', + FHIR_API_BASE: '', + SESSION_STORAGE_ENC_KEY: '' }; // Generate output data