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 ./
|
COPY frontend/package.json ./
|
||||||
RUN yarn install --frozen-lockfile
|
RUN yarn install --frozen-lockfile
|
||||||
COPY frontend/ ./
|
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
|
FROM golang:1.18 as backend-build
|
||||||
WORKDIR /go/src/github.com/fastenhealth/fastenhealth-onprem
|
WORKDIR /go/src/github.com/fastenhealth/fastenhealth-onprem
|
||||||
|
|
|
@ -47,7 +47,33 @@
|
||||||
"optimization": true,
|
"optimization": true,
|
||||||
"outputHashing": "all",
|
"outputHashing": "all",
|
||||||
"sourceMap": false,
|
"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,
|
"namedChunks": false,
|
||||||
"extractLicenses": true,
|
"extractLicenses": true,
|
||||||
"vendorChunk": false,
|
"vendorChunk": false,
|
||||||
|
@ -65,6 +91,7 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"serve": {
|
"serve": {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import {Router} from '@angular/router';
|
import {NavigationEnd, Router} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
|
@ -10,7 +10,7 @@ export class AppComponent implements OnInit {
|
||||||
title = 'fastenhealth';
|
title = 'fastenhealth';
|
||||||
|
|
||||||
public layoutOption: string;
|
public layoutOption: string;
|
||||||
showHeader:boolean = true;
|
showHeader:boolean = false;
|
||||||
showFooter:boolean = true;
|
showFooter:boolean = true;
|
||||||
|
|
||||||
constructor(private router: Router) {}
|
constructor(private router: Router) {}
|
||||||
|
@ -28,8 +28,8 @@ export class AppComponent implements OnInit {
|
||||||
this.router.events.subscribe(event => this.modifyHeader(event));
|
this.router.events.subscribe(event => this.modifyHeader(event));
|
||||||
}
|
}
|
||||||
|
|
||||||
modifyHeader(location) {
|
modifyHeader(event) {
|
||||||
if(location.url?.startsWith('/auth'))
|
if(event instanceof NavigationEnd && event.url?.startsWith('/auth'))
|
||||||
{
|
{
|
||||||
this.showHeader = false;
|
this.showHeader = false;
|
||||||
} else {
|
} 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