The community bonding period is finish and the actual coding period has begun. it’s the first week of the coding period. I started by making a choice of how I’m going to do test and view changes.
So I decided to go with the sdk server, firstly I setup the sdk-server following the steps at Openmrs-sdk then built the present common lab test module using the legacy UI to view all the cases uses in the module
Setting up dependencies
The openmrs owa is being generated using Yo, by installing the Openmrs-owa generator using npm. to do that we first have to setup npm which comes with nodejs (for those who don’t have it install) or check the version by open or terminal with
ctrl+t (for linux user) and typing
npm --version Or we can install npm here
Now the we have npm install we have to install Yo
First what is Yo??, Yo stands for Yeoman, it’s a modern web Apps scaffolding tool that help you to kick start new projects prescribing Best Practises and Tools. To do so, it provide a generator ecosystem. A generator is basically a plugin that can be run with the `yo` command to scaffold complete projects or useful parts.
Now, still on the terminal you type
npm install -g yo and hit Enter, this will install Yo.
We will then have to install the openmrs OWA generator by Running
npm install -g @openmrs/generator-openmrs-owa after this step the openmrs generator is completely installed.
Generating the OWA
After we have successfully install all our dependencies that we need, we can then generate our own OWA
First we start by creating a new directory and naming it using the the openmrs name module convention by
mkdir openmrs-owa-nameofyourowalike so
- Next we move into the newly created directory
cd openmrs-owa-nameofyourowathat will be
- we now run our generator
- you will then have to fill the necessary information like
- Your app name
- Give a description of what the app is all about
- Select what kind of openmrs server you running(Enterprise, Standalone or SDK)
- The Framework or library you are going to build your app in(React, Angular or React + Redux)
- The server URL you will want you app to server from locally
- The path to the your app directory
- After all this the generator will automatically scrafford your app out for you and the install the node-module then you should have something of like this
- To build the distribution zip file run
npm run build:prod
npm run build:deployto deploy to you local server
npm run watchfor live reload of your app
The openmrs OWA generator provides you with some basic HTML and CSS. it setup the webpack config and also the package.Json file which holds all the dependency versioning of you project. we have currently setup the project
WEEK 2 Commits
- Integrating openmrs-react-components and reference-app styles
- Building UI Form for Add attribute type.