HospitalRun Components
This repository will host reusable react components made for the HospitalRun frontend.
Install
Install components:
npm install @hospitalrun-org/components
Install react-bootstrap:
npm install react-bootstrap
[Optional] You may need node-sass
if you want to import components' .scss
files:
npm install -D node-sass
Contributing
Contributions are always welcome. Before contributing please read our contributor guide.
- Fork this repository to your own GitHub account and then clone it to your local device
- Navigate to the cloned folder:
cd components
- Install the dependencies:
npm install
- Run
npm link
to link the local repo to the global npm folder - Run
npm run dev
to build and watch for code changes - In another terminal window create a new react project with
npx create-react-app my-app
- Navigate (
cd my-app
) to your react project and install node-sass: npm install -D node-sass
. Components styles are coded using scss and you need this dependency in order to successfully import components' .scss
files - Link the components repo inside your newly created react project with
npm link components
- Start your react project with
npm start
and enjoy hot reloading when applying changes in the components repo
How to commit
The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages.
The commit message should be structured as follows <type>[optional scope]: <description>
feat: allow provided config object to extend other configs
fix: correct minor typos in code
BREAKING CHANGE: dropping Node 6 which hits end of life in April
docs: correct spelling of CHANGELOG
Common types can be:
- build: Changes that affect the build system or external dependencies (example scopes: fastify, react, npm)
- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Azure DevOps, SauceLabs)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- test: Adding missing tests or correcting existing tests
Behind HospitalRun
Hosted by
Backers
Lead Maintainer
Maksim Sinik
Core Team
Medical Supervisor
M.D. Daniele Piccolo
Contributors
Founders
License
Released under the MIT license.