Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
khavinshankar committed Sep 25, 2023
1 parent 13b3730 commit b7b3551
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
37 changes: 16 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
# React + TypeScript + Vite
# HI Profiles

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
**This package provides react components for the [ABDM FHIR profiles](https://nrces.in/ndhm/fhir/r4/index.html).**

Currently, two official plugins are available:
### Installation

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
```sh
npm install hi-profiles
```

- Configure the top-level `parserOptions` property like this:
### Usage

```js
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
import { HIProfile } from "hi-profiles";
import fhirBundle from "..."; // sample abdm fhir bundles can be found at https://sandbox.abdm.gov.in/abdm-docs/DiagnosticReports

export default function App() {
return (
<HIProfile bundle={fhirBundle} />
)
}
```
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hi-profiles",
"private": false,
"version": "1.0.4",
"version": "1.0.5",
"type": "module",
"main": "dist/index.umd.js",
"module": "dist/index.es.js",
Expand All @@ -14,6 +14,10 @@
"abdm",
"abdm m3"
],
"repository": {
"type": "git",
"url": "https://github.com/coronasafe/hi-profiles"
},
"exports": {
".": {
"import": "./dist/index.es.js",
Expand Down

0 comments on commit b7b3551

Please sign in to comment.