Skip to content

Commit

Permalink
Update the Angular configuration for development
Browse files Browse the repository at this point in the history
  • Loading branch information
qligier committed Dec 9, 2024
1 parent df02db6 commit df250e2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
17 changes: 5 additions & 12 deletions matchbox-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,13 @@ Chrome on OSX has a CORS Problem and cannot execute te $extract operation, this
if you are not using the devcontainer from this project with [VS Code Remote Development](https://code.visualstudio.com/docs/remote/containers) extension you need to have angular cli and [yarn](https://yarnpkg.com/en/) installed:

```
npm install -g @angular/cli
npm install
ng build --configuration development
npm ci
npm run start
```

and then

ng serve --configuration development

## usage

Run `ng serve --configuration development` to start the app, app will be at [http://localhost:4200](http://localhost:4200/).
Run `npm run start` to start the app, app will be at [http://localhost:4200](http://localhost:4200/).
If you use the Visual Code functionality with Remote containers: Open Folder in container option, you need to start it with `ng serve --host 0.0.0.0`.

if you use localhost and have cross site blocking issues within chrome start chrome directly from command line (osx)
Expand All @@ -43,16 +38,14 @@ if you use localhost and have cross site blocking issues within chrome start chr

## running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
Run `npm run test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## frontend for matchbox

this angular app is directly provided with matchbox

```
ng build --configuration production
rm -rf ../matchbox-server/src/main/resources/static/*
cp -r dist/* ../matchbox-server/src/main/resources/static
npm run build-matchbox
```

## Contributing
Expand Down
11 changes: 8 additions & 3 deletions matchbox-frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"browser": "src/main.ts",
"allowedCommonJsDependencies": [
"fhirpath", "fhir-kit-client", "js-untar"
],
]
},
"configurations": {
"production": {
Expand All @@ -45,10 +45,15 @@
]
},
"development": {
"optimization": false,
"optimization": {
"scripts": true,
"styles": false,
"fonts": false
},
"outputHashing": "all",
"sourceMap": true,
"namedChunks": true,
"extractLicenses": true
"progress": true
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion matchbox-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"start": "ng serve --configuration development",
"build": "ng build --configuration production",
"build-matchbox": "ng build --configuration production --verbose --output-path ../matchbox-server/src/main/resources/static",
"test": "ng test",
Expand Down

0 comments on commit df250e2

Please sign in to comment.