From 6f74eeb1288d9005cf9250f04ec98af49cd03069 Mon Sep 17 00:00:00 2001 From: John Emmerechts Date: Sat, 3 Aug 2024 21:59:55 +0200 Subject: [PATCH] Readme --- apps/nextjs/README.md | 19 +++++++++++++------ apps/nextjs/src/app/page.tsx | 4 ++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/apps/nextjs/README.md b/apps/nextjs/README.md index 2d9aa0b..5dba620 100644 --- a/apps/nextjs/README.md +++ b/apps/nextjs/README.md @@ -63,13 +63,20 @@ Typescript configuratioon specific to the bundlling process An ugly but working typing of zoid and some other libarry from the @krakenJs suite - **components/zoid/*.ts** : -Folder to place the Zoid components, for now the RollupJs config expect to find a zoid components per .ts, so eah zoid omponoent should be .ts and everything in on file. -- app/api/widgets/[component]/route -- a page with Zoid integrated : +Folder to place the Zoid components, for now the RollupJs config expect to find a zoid components per .ts, so eah zoid omponoent should be .ts and everything in on file. + +- **app/api/widgets/[component]/route.ts**: +We call our [component].js from an api endpoint this is a starting point to help for security #Xss and or user experience + +- Page(s) with Zoid integrated : - example 1: app/zoid-button/page.tsx - - example 2: app/zoid-child/page.tsx -- autogeneated from rollup but requied to work dist/\[name-of-the-zoid-component\].js -- .env containing `ZOID_FRAME_ONLY` + - example 2: app/zoid-advanced/page.tsx + +- **src/widgets/\[name-of-the-zoid-component\].js** : +Autogenerated from rollup but required to work + +- **.env** : +Should containing `ZOID_FRAME_ONLY` ### Requied dependecies ```bash diff --git a/apps/nextjs/src/app/page.tsx b/apps/nextjs/src/app/page.tsx index d6006c0..8cfdb32 100644 --- a/apps/nextjs/src/app/page.tsx +++ b/apps/nextjs/src/app/page.tsx @@ -6,10 +6,10 @@ export default function HomePage() { return (
-

+

Next Js using Zoid

-

This website expose 2 Zoid components to the followinng website : third-part-nextjs-zoid.vercel.app

+

This website expose 2 Zoid components used by the following website: third-part-nextjs-zoid.vercel.app

);