git clone https://DHDEVCD@dev.azure.com/DHDEVCD/PCDE/_git/fal-spa-ngx
Install the dependencies:
Run the application:
Open the browser to http://localhost:4200/
npm install -g @azure/static-web-apps-cliThen run the following command:
npm run start:hosting
This project utilizes both in-house and third-party dependencies.
In-house dependencies are published to the package registry on Azure Devops: https://dev.azure.com/DHDEVCD/PCDE/_packaging?_a=feed&feed=dignity-health
The following core libraries are used in this project:
To keep maintainability we strongly encourage a specific design structure. Below are some references to our practices and principles on keeping a clean, scalable, and maintainable code base:
In the first link you will also find some really insightful blog posts near the bottom of the ReadMe.
npm run start for a dev server. Navigate to
http://localhost:4200/. The app will automatically reload if you change any of the source files.
npm run start:all to run the dev server for all example sites at once to do theme usage testing and validation.
npm run start:hosting to simulate how the example sites and documentation are hosted in the deployed environment.
npm run ng -- generate component component-name to generate a new component. You can also use
npm run ng -- generate directive|pipe|service|class|guard|interface|enum|module.
npm run ng -- g module features/new-feature-name to generate a new feature module. Append the command with
--routing to configure for Angular routing.
npm run ng -- g module features/search-landing --routingto generate a new feature module with routing.
serveconfig blocks in angular.json
npm run build to build the project. The build artifacts will be stored in the
npm run build:dist to build the project and all documentation artifacts. The final artifacts will be stored in public/.
npm run test to execute the unit tests.
npm run test:ci to execute the unit tests as it will in the CI pipeline.
npm run e2e to execute the end-to-end tests.
npm run e2e:ci to execute the end-to-end tests as it will in the CI pipeline.
Before you submit your PR you may want to generate the documentation for yourself. It can be very useful in helping you find any hidden bugs, bad routing, etc. To generate documentation run one of the three following commands:
To continually generate docs as you code, run:
npm run docs:watch
To build and serve the documentation on a live server, run:
npm run docs:serve
To build the static documentation for deployment, simply run:
npm run docs:build
The documentation package includes the documentation for this entire project including a dependency graph, all modules, classes, directives, and pipes. It also contains installation instructions under the "Additional Documentation" tab. It is possible to separate the two during deployment.
We use the git-flow as a branching strategy - keeping two running branches (develop, and master). There are a few cool tools that you can use to help you with this. git-flow-avh is one i personally use. It's a great tool for managing local branches and will not let you create feature branches off of anything except develop. For example, if you forget to change branches between PR's and try to make a new branch, git-flow will create the new branch off of develop unless you explicitly tell it not to.
However you choose to work with git, the basic workflow is as follows:
git checkout -b <branch-name>)
git add .)
git commit -m "message")
git push origin <branch-name>)
az devops pull-request create --source <branch-name> --target develop) -- or, you know, you can use the ui too 🤷♂️
Cloud infrastructure is provisioned through this repository using Terraform.
Pivot to Azure Static Web Apps: As of the week of 10/18, the infrastructure as code (IaC) within the repository was updated to push the Find a Location application into an Azure static web app instance in each environment (as opposed to pushing files into an Azure storage container with a CDN profile entry point). The previous IaC for the storage accounts, CDN profiles, and CDN endpoints was removed.