diff --git a/.circleci/config.yml b/.circleci/config.yml index a3fa7d9..8217c41 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,7 @@ jobs: - run: name: Build - command: yarn build + command: yarn build -c ${CIRCLE_BRANCH} - persist_to_workspace: root: ./ @@ -56,7 +56,7 @@ jobs: - run: name: Deploy - command: gsutil cp -r dist/ZaksCode/* gs://staging.zaks-code.appspot.com + command: gsutil cp -r dist/ZaksCode/* gs://staging.zakscode.com deploy-prod: docker: diff --git a/angular.json b/angular.json index 81b7d66..f97f470 100644 --- a/angular.json +++ b/angular.json @@ -29,6 +29,30 @@ "es5BrowserSupport": true }, "configurations": { + "master": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.staging.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": true, + "extractCss": true, + "namedChunks": false, + "aot": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": false, + "budgets": [ + { + "type": "initial", + "maximumWarning": "2mb", + "maximumError": "5mb" + } + ] + }, "production": { "fileReplacements": [ { @@ -133,4 +157,4 @@ } }, "defaultProject": "ZaksCode" -} \ No newline at end of file +} diff --git a/src/environments/environment.staging.ts b/src/environments/environment.staging.ts new file mode 100644 index 0000000..7b4f817 --- /dev/null +++ b/src/environments/environment.staging.ts @@ -0,0 +1,16 @@ +// 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 = { + 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.