From c3515af41491af1e5e3cebf146916e2847dfd569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=B5hjakivi?= Date: Mon, 31 Jul 2023 15:04:02 +0300 Subject: [PATCH 1/2] add non-react qr library. add first Svelte component to Home --- package.json | 3 +++ src/Hello.svelte | 22 ++++++++++++++++++++++ src/assets/qrcode.min.js | 1 + src/components/Home.tsx | 14 ++++++++++++-- svelte.config.js | 15 +++++++++++++++ vite.config.ts | 3 ++- 6 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 src/Hello.svelte create mode 100644 src/assets/qrcode.min.js create mode 100644 svelte.config.js diff --git a/package.json b/package.json index 857615a..eca73ea 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "react-router-dom": "^6.8.2", "react-uuid": "^2.0.0", "rollup-plugin-node-polyfills": "^0.2.1", + "svelte": "^4.1.1", "u8-mqtt": "^0.3.2-0", "vite-plugin-node-polyfills": "^0.7.0" }, @@ -27,6 +28,7 @@ "@babel/preset-env": "^7.20.2", "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.21.0", + "@sveltejs/vite-plugin-svelte": "^2.4.3", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", @@ -39,6 +41,7 @@ "identity-obj-proxy": "^3.0.0", "jest": "^29.4.3", "jest-environment-jsdom": "^29.4.3", + "svelte-preprocess": "^5.0.4", "ts-jest": "^29.0.5", "ts-node": "^10.9.1", "typescript": "^4.9.3", diff --git a/src/Hello.svelte b/src/Hello.svelte new file mode 100644 index 0000000..9b8c974 --- /dev/null +++ b/src/Hello.svelte @@ -0,0 +1,22 @@ + + + + - - - + + +