adding a sandbox configuration (to build "production-like" version connecting to sandbox).
default "showHeader" to false.
This commit is contained in:
parent
35a9025349
commit
36370c591d
|
@ -4,7 +4,7 @@ WORKDIR /usr/src/fastenhealth/frontend
|
|||
COPY frontend/package.json ./
|
||||
RUN yarn install --frozen-lockfile
|
||||
COPY frontend/ ./
|
||||
RUN yarn run build -- --output-path=../dist
|
||||
RUN yarn run build -- --configuration sandbox --output-path=../dist
|
||||
|
||||
FROM golang:1.18 as backend-build
|
||||
WORKDIR /go/src/github.com/fastenhealth/fastenhealth-onprem
|
||||
|
|
|
@ -47,7 +47,33 @@
|
|||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb",
|
||||
"maximumError": "10kb"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.sandbox.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"namedChunks": false,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
|
@ -65,6 +91,7 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import {Router} from '@angular/router';
|
||||
import {NavigationEnd, Router} from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
|
@ -10,7 +10,7 @@ export class AppComponent implements OnInit {
|
|||
title = 'fastenhealth';
|
||||
|
||||
public layoutOption: string;
|
||||
showHeader:boolean = true;
|
||||
showHeader:boolean = false;
|
||||
showFooter:boolean = true;
|
||||
|
||||
constructor(private router: Router) {}
|
||||
|
@ -28,8 +28,8 @@ export class AppComponent implements OnInit {
|
|||
this.router.events.subscribe(event => this.modifyHeader(event));
|
||||
}
|
||||
|
||||
modifyHeader(location) {
|
||||
if(location.url?.startsWith('/auth'))
|
||||
modifyHeader(event) {
|
||||
if(event instanceof NavigationEnd && event.url?.startsWith('/auth'))
|
||||
{
|
||||
this.showHeader = false;
|
||||
} else {
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// 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: true,
|
||||
lighthouse_api_endpoint_base: 'https://lighthouse.fastenhealth.com/sandbox'
|
||||
};
|
||||
|
||||
/*
|
||||
* 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.
|
Loading…
Reference in New Issue