diff --git a/apps/octra/project.json b/apps/octra/project.json index 058a8edc0..ea921346d 100644 --- a/apps/octra/project.json +++ b/apps/octra/project.json @@ -88,6 +88,29 @@ ], "outputHashing": "all" }, + "beta-dev": { + "buildOptimizer": true, + "optimization": true, + "budgets": [ + { + "type": "initial", + "maximumWarning": "2mb", + "maximumError": "6mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb", + "maximumError": "10kb" + } + ], + "fileReplacements": [ + { + "replace": "apps/octra/src/environments/environment.ts", + "with": "apps/octra/src/environments/environment.beta-dev.ts" + } + ], + "outputHashing": "all" + }, "development": { "buildOptimizer": false, "optimization": false, diff --git a/apps/octra/src/app/app.module.ts b/apps/octra/src/app/app.module.ts index b3324ad11..d5f254fb6 100644 --- a/apps/octra/src/app/app.module.ts +++ b/apps/octra/src/app/app.module.ts @@ -95,12 +95,14 @@ import { RouterModule } from '@angular/router'; }, } ), - StoreDevtoolsModule.instrument({ - trace: true, - maxAge: 50, - logOnly: !environment.production, - connectInZone: true, - }), + !environment.production + ? StoreDevtoolsModule.instrument({ + trace: !environment.production, + maxAge: 50, + logOnly: !environment.production, + connectInZone: true, + }) + : [], EffectsModule.forRoot([ IDBEffects, ApplicationEffects, @@ -108,9 +110,6 @@ import { RouterModule } from '@angular/router'; APIEffects, AuthenticationEffects, ]), - !environment.production - ? StoreDevtoolsModule.instrument({ connectInZone: true }) - : [], EffectsModule.forFeature([]), NgbDropdownModule, NgbNavModule, diff --git a/apps/octra/src/environments/environment.beta-dev.ts b/apps/octra/src/environments/environment.beta-dev.ts new file mode 100644 index 000000000..91cffe1a1 --- /dev/null +++ b/apps/octra/src/environments/environment.beta-dev.ts @@ -0,0 +1,14 @@ +export const environment = { + production: true, + dev_version: false, + beta_version: true, + useCookies: true, + debugging: { + enabled: true, + logging: { + console: true, + actions: true, + routes: true + } + } +}; diff --git a/apps/octra/src/environments/environment.beta.ts b/apps/octra/src/environments/environment.beta.ts index ecfa11edc..6edfa60a7 100644 --- a/apps/octra/src/environments/environment.beta.ts +++ b/apps/octra/src/environments/environment.beta.ts @@ -7,7 +7,7 @@ export const environment = { enabled: true, logging: { console: true, - actions: true, + actions: false, routes: false } } diff --git a/build.js b/build.js index 9c3369f72..d049f596f 100644 --- a/build.js +++ b/build.js @@ -27,6 +27,10 @@ if (process.argv[2] === "beta=true") { dev = "--configuration=beta"; } +if (process.argv[2] === "beta=dev") { + dev = "--configuration=beta-dev"; +} + if (process.argv[3] === "isUpdate=true") { isUpdate = true; } @@ -35,7 +39,7 @@ if (process.argv[4].indexOf("url=") > -1) { baseHref = process.argv[4].replace("url=", ""); } -console.log(`Building OCTRA with dev=${dev}, isUpdate=${isUpdate} for ${baseHref}`); +console.log(`Building OCTRA with ${dev}, isUpdate=${isUpdate} for ${baseHref}`); console.log(`Remove dist...`); execSync(`rm -rf "./${buildDir}"`); let command = ["./node_modules/nx/bin/nx.js", "build", "octra", "--prod", dev, `--base-href=${baseHref}`]; diff --git a/runner.js b/runner.js index b5ff5c8ba..5c2fbcb23 100644 --- a/runner.js +++ b/runner.js @@ -79,7 +79,7 @@ const OCTRA = { }, buildBetaDevUpdate: async function () { await run( - 'node ./build.js beta=true isUpdate=true url=/apps/octra/octra-dev/' + 'node ./build.js beta=dev isUpdate=true url=/apps/octra/octra-dev/' ); await setBuildVariable(); },