Skip to content

Commit

Permalink
Update README for demo renderer app
Browse files Browse the repository at this point in the history
  • Loading branch information
fongsean committed Nov 27, 2023
1 parent f9b55f6 commit 50cf486
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 33 deletions.
31 changes: 5 additions & 26 deletions apps/demo-renderer-app/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
# React + TypeScript + Vite
# Minimal Demo Renderer App

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
This app showcases the usage of the `@aehrc/smart-forms-renderer` and `@aehrc/sdc-populate` in a minimal setup. The near-zero styling is intentional to focus on the core functionality.

Currently, two official plugins are available:
It also demonstrates the pre-population of questionnaires with just an OAuth2.0 Bearer Token. SMART App Launch is used, but only for obtaining the bearer token.

- [@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
Bootstrapped with React + TypeScript + Vite template.

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

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

```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


Note to devs working on this: apps/demo-renderer-app is not included in npm workspaces to test if packages are working as a standalone
CodeSandbox: https://codesandbox.io/p/devbox/demo-renderer-app-krxmjy
8 changes: 4 additions & 4 deletions apps/demo-renderer-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions apps/demo-renderer-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --port 5555",
"start": "vite --port 5555",
"dev": "vite",
"start": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@aehrc/sdc-populate": "^1.1.0",
"@aehrc/smart-forms-renderer": "^0.10.0",
"@aehrc/smart-forms-renderer": "^0.10.1",
"@tanstack/react-query": "^4.36.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down

0 comments on commit 50cf486

Please sign in to comment.