git clone https://DHDEVCD@dev.azure.com/DHDEVCD/PCDE/_git/fal-spa-ngx
Install the dependencies: npm install
Run the application: npm start
Open the browser to http://localhost:4200/
npm install -g @azure/static-web-apps-cli
Then run the following command:npm run start:hostingThis 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:
CommonSpirit Angular Standards
In the first link you will also find some really insightful blog posts near the bottom of the ReadMe.
Run 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.
Run npm run start:all to run the dev server for all example sites at once to do theme usage testing and validation.
Run npm run start:hosting to simulate how the example sites and documentation are hosted in the deployed environment.
Run 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.
Run 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.
Examples:
npm run ng -- g module features/search-landing --routing to generate a new feature module with routing.build and serve config blocks in angular.jsonangular.json --> projects.fal-spa-ngx.architect.build.configurations.development-dh or Click hereinput value on the assets block for glob configuration.json See: exampleangular.json --> projects.fal-spa-ngx.architect.serve.configurations.development-dh43Run npm run build to build the project. The build artifacts will be stored in the dist/ directory.
Run npm run build:dist to build the project and all documentation artifacts. The final artifacts will be stored in public/.
Run npm run test to execute the unit tests.
Run npm run test:ci to execute the unit tests as it will in the CI pipeline.
Run npm run e2e to execute the end-to-end tests.
Run 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:watchTo build and serve the documentation on a live server, run:
npm run docs:serveTo build the static documentation for deployment, simply run:
npm run docs:buildThe 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.
The following are the core feature modules of this application: fal-lite home search location
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.
References