Automation of create-openmrs-owa with React Components

Tags: #<Tag:0x00007fe2d752f5c8> #<Tag:0x00007fe2d752f500>

@judeniroshan, i am actually refining my commits, give me couple of hours and you will see a refined version

@judeniroshan, Meeting today same time? 7pm munich time

yes, I’m available. @mogoodrich will you be able to attend?

1 Like

Meeting tomorrow!

time: 7pm CEST

@judeniroshan, I am currently working on a customizable starter kit version of openmrs-react-components, I have created a npm package to test out my findings and a gif to explaing the current status.

1 Like

Hi @beingtmk,

Are you already aware about this error?

1 Like

@judeniroshan, yes are you trying my example repository?

As mentioned in the Readme you will have to use my fork of openmrs-react-components as the example repository conatins new components

@judeniroshan, @mogoodrich Try this!

create-react-app test-app --scripts-version openmrs-react-scripts

This will create a test-app with openmrs-react-components & its dependencies configured!

Repo for above code: https://github.com/beingtmk/create-react-app?organization=beingtmk&organization=beingtmk

Corresponding npm package: https://www.npmjs.com/package/openmrs-react-scripts

I will move my work done until now into this.

I am thinking, i will ask for a terminal argument based on which

  1. either a example-repo (containing documentation)
  2. template with minimal or only required configuration (people can just start coding)

The above npm package is installing from published npm package of openmrs-react-components.

1 Like

@judeniroshan,

So i will keep working on the creating the starter kit version of openmrs-react-components.

There will be two types of starter templates:

  1. Example Repository
  2. Minimal Configuration Repository

Also i will move all the work done till now into the Example Repository which could be installed from the corresponding npm package

1 Like

Cool @beingtmk! I just created the test-app using create-react-app… looking forward to playing around with it!

Take care, Mark

1 Like

This is the final repository, where all my code will reside from now on,

This is based on a fork of create-react-app

there are two branches in this repository

  1. master - provides code for app with Minimal Configuration, which can be run using:

create-react-app test-app --scripts-version openmrs-react-scripts

  1. example - provides code for the example app with Basic Usage/Documentation, which can can run using:

create-react-app test-app --scripts-version openmrs-react-scripts-example

Hi @beingtmk,

I do not see the upstream for this repository. Can you fix it? Because it’s hard to compare the changes what you have done so far. And in future we also want to merge our fork with facebook repository to make our project up-to-date.

As we discussed in our previous meeting, can you design the homepage of the generated project to adhere with our default OpenMRS web UI template?

I have also modified the main readme file to make more clarity about the project. There are 3 more sections that I expect from you to fill it out. :slight_smile:

PS: Please do not directly commit to the master branch of your repository. Make PRs and assign them to me.

1 Like

@judeniroshan,

I have added you as a collaborator, pls accept the invitation at

https://github.com/beingtmk/create-openmrs-app/invitations

and i have created a pr to fill in the missing peices in the Readme

1 Like

@beingtmk https://github.com/openmrs/openmrs-owa-builtinreports/tree/master/app/js/components/common

1 Like

Travis CI integrated & working for the packages!

@judeniroshan

These are the two final repositories for my submission

  1. Minimalistic Template: https://github.com/beingtmk/create-openmrs-app
  2. Example Template: https://github.com/beingtmk/create-openmrs-app-example

I have removed all the parts of the fork from facebook-cra which were unnecessary.

Now these repositories only contain the part that i have edited, which is of the package “react-scripts”. This is the only part that is responsible for generating the final template.

Both of the above repositories are published to npm with travis ci integrated.

The way you generate a template is:

npx create-react-app test-app --scripts-version openmrs-react-scripts

so basically you are just using the create-react-app to generate the project, just that you are using the customized version of the “react-scripts”, that is responsible for the final customization of the template once the project is generated by cra.

Hope this reduces maintainability to only those parts which we anyways need to maintain.

The UI of the Example Template has also been changed.

  1. Default OpenMRS UI
  2. Overview with props and other notes
  3. sample code

gif attached below

Peek-2019-08-28-05-43.gif

@beingtmk You have missed to submit your final evaluations on OpenMRS talk. Can you make it as soon as possible?

@suthagar23, sorry for the delay, almost completed work on the video. will do it soon!

Final Demo Video,

2 Likes