A custom microfrontend for OpenMRS HIV Reference Implementation (OHRI)
(tbd)
- React (TypeScript) - Front-end JS library
- Formik - Form builder JS library
- Day.js - Date library
- Jest - JS testing framework
- React Testing Library - JS testing library for React components
- npm - Node package manager
- webpack - JS module bundler
- ESLint - JS linter
- Prettier - Code formatter
- Babel - JS compiler
- Travis CI - CI service
- Clone the openmrs-esm-ohri repo.
git clone https://github.com/UCSF-IGHS/openmrs-esm-ohri.git
- Install dependencies in the root directory of the repo.
- make sure you are using a relatively recent version of node, LTE is 14.x.x, you can type node -version to find your current version. I would recommend using n to manage your node version: see https://www.npmjs.com/package/n
npm i
- Run the module from
localhost:8080
.
npm run serve
- Click
Add new module
in the dev tools window. - Type in the
Module Name:
@openmrs/esm-ohri-app
. - Type in the
Override URL:
8080
. - Go to the browser's development tools (e.g. via
Inspect
). - Go to the
Application
tab. - Go to
Local Storage
. - Find the key:
import-map-override:@openmrs/esm-ohri-app
- Update the corresponding value to:
//localhost:8080/openmrs-esm-ohri.js
. - Click on the padlock/warning message next to the URL in the browser.
- Select the
Allow
option from theInsecure content
dropdown in the browser settings page. - Refresh the page.
To verify that all of the tests run:
npm test
Note: Run npm i
before running tests for the first time.
Currently, available releases for this module:
This module is designed to be driven by configuration files. These files define the look and functionality required to drive the OHRI module.
Note: Currently, the module cannot be configured as it is in the early stages of development.
(tbd)
(tbd)
(tbd)