Skip to content

Commit

Permalink
fixing build commands. make sure that we can build a desktop flavor o…
Browse files Browse the repository at this point in the history
…f the UI.
  • Loading branch information
AnalogJ committed Aug 27, 2023
1 parent 16209c9 commit 011cfa3
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 5 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,16 @@ dep-frontend:

.PHONY: build-frontend-sandbox
build-frontend-sandbox: dep-frontend
cd frontend
yarn run build -- --configuration sandbox --output-path=../dist
cd frontend && yarn build -- -c sandbox

.PHONY: build-frontend-prod
build-frontend-prod: dep-frontend
cd frontend
yarn run build -- --configuration prod --output-path=../dist
cd frontend && yarn build -- -c prod

.PHONY: build-frontend-desktop
build-frontend-desktop: dep-frontend
cd frontend && yarn build -- -c desktop


.PHONY: test-frontend
# reduce logging, disable angular-cli analytics for ci environment
Expand Down
30 changes: 30 additions & 0 deletions frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,33 @@
"maximumError": "10kb"
}
]
},
"desktop": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.desktop.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "10mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
Expand All @@ -143,6 +170,9 @@
},
"cloud_sandbox": {
"browserTarget": "fastenhealth:build:cloud_sandbox"
},
"desktop": {
"browserTarget": "fastenhealth:build:desktop"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ng": "ng",
"start": "ng serve",
"serve": "ng serve",
"build": "ng build",
"build": "ng build --output-path=../dist",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
Expand Down
11 changes: 11 additions & 0 deletions frontend/src/environments/environment.desktop.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export const environment = {
production: true,
environment_cloud: false,
environment_name: "desktop",

lighthouse_api_endpoint_base: 'https://lighthouse.fastenhealth.com/v1',


//used to specify the api server that we're going to use (can be relative or absolute). Must not have trailing slash
fasten_api_endpoint_base: '/api',
};

0 comments on commit 011cfa3

Please sign in to comment.