Git Product home page Git Product logo

openmrs-frontend-generators's Introduction

OpenMRS Generators

Implementation plan, from Joel Denning:

I think npm init openmrs is the easiest api for people to use. This means there needs to be an npm project called create-openmrs that has a bin field.

A successful openmrs-specific generator would likely include creating somewhere around 5ish npm packages. I think that a lerna monorepo worked very well for create-single-spa, and could make local development and overall project management of all those create-openmrs packages easier. Monorepos are sort of the opposite of microfrontends smile, but I think they work very well for this case of managing many npm packages together.

I think the following npm packages would likely be need to be implemented:

  • webpack-config-openmrs-single-spa (would extend webpack-config-single-spa with openmrs-specific stuff (such as translation stuff, openmrs-specific webpack externals, etc)
  • webpack-config-openmrs-single-spa-react (would extend webpack-config-single-spa-react).
  • generator-openmrs. This would would call this.composeWith(require.resolve('generator-single-spa/src/generator-single-spa.js'), passing in openmrs-specific options that are used instead of prompting the user for things. This part is where we'd have to dig in to find out exactly which parts can be composed and which can't
  • openmrs-tsconfig. This would be an extendable typescript config file. The generator-openmrs project would have a tsconfig.json template in it that would extend the typescript config but still allow for project-specific customization
  • openmrs-jest-config - this would be a shareable jest config. Used like so:
// jest.config.js
const config = require('openmrs-jest-config');

config.moduleNameMapper['custom-mocked-file'] = '<rootDir>/__mocks__/custom-mocked-file.ts'

module.exports = config

Using the lerna monorepo strategy would mean that there would be only one github repository, create-openmrs, with the following directory structure:

packages/
  create-openmrs/
  generator-openmrs/
  webpack-config-openmrs-single-spa/
  webpack-config-openmrs-single-spa-react/
  openmrs-ts-config/
  openmrs-jest-config/

openmrs-frontend-generators's People

Contributors

dependabot[bot] avatar brandones avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.