From 50cf486b1891ea6320a83987ada7695bd6ef64f7 Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Mon, 27 Nov 2023 20:47:51 +1030 Subject: [PATCH] Update README for demo renderer app --- apps/demo-renderer-app/README.md | 31 ++++-------------------- apps/demo-renderer-app/package-lock.json | 8 +++--- apps/demo-renderer-app/package.json | 6 ++--- 3 files changed, 12 insertions(+), 33 deletions(-) diff --git a/apps/demo-renderer-app/README.md b/apps/demo-renderer-app/README.md index aba81771a..a32fc6f9b 100644 --- a/apps/demo-renderer-app/README.md +++ b/apps/demo-renderer-app/README.md @@ -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 diff --git a/apps/demo-renderer-app/package-lock.json b/apps/demo-renderer-app/package-lock.json index d7b093cbe..1f99a358d 100644 --- a/apps/demo-renderer-app/package-lock.json +++ b/apps/demo-renderer-app/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0", "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", @@ -59,9 +59,9 @@ } }, "node_modules/@aehrc/smart-forms-renderer": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@aehrc/smart-forms-renderer/-/smart-forms-renderer-0.10.0.tgz", - "integrity": "sha512-X9FoUealc9p/0kcVov2dMx+H5lQaUhOHny+n3zAoJ2H639KtTHPmsqv184vWkOBNTbTmg3EQghrdJB10HA34vA==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@aehrc/smart-forms-renderer/-/smart-forms-renderer-0.10.1.tgz", + "integrity": "sha512-bTZjUsxz/rR65vliTVqp1VxfYUpjytUAZqf3T9l+AaXzDZtL7tpq6jtI7wdhvfH0rJ4Y7VcOXyTm8wPcMgKj3g==", "dependencies": { "@aehrc/sdc-assemble": "^1.0.2", "@iconify/react": "^4.1.1", diff --git a/apps/demo-renderer-app/package.json b/apps/demo-renderer-app/package.json index cae9e5016..e513b6c17 100644 --- a/apps/demo-renderer-app/package.json +++ b/apps/demo-renderer-app/package.json @@ -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",