Skip to content

Commit

Permalink
adding build-frontend-desktop-prod
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Aug 29, 2023
1 parent 00d0684 commit 204ea95
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ build-frontend-prod: dep-frontend
build-frontend-desktop: dep-frontend
cd frontend && yarn build -- -c desktop_sandbox

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


.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 @@ -153,6 +153,33 @@
"maximumError": "10kb"
}
]
},
"desktop_prod": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.desktop_prod.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 @@ -173,6 +200,9 @@
},
"desktop_sandbox": {
"browserTarget": "fastenhealth:build:desktop_sandbox"
},
"desktop_prod": {
"browserTarget": "fastenhealth:build:desktop_prod"
}
}
},
Expand Down
12 changes: 12 additions & 0 deletions frontend/src/environments/environment.desktop_prod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export const environment = {
production: true,
environment_cloud: false,
environment_desktop: true,
environment_name: "desktop_prod",

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 204ea95

Please sign in to comment.