Skip to content

Commit

Permalink
Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
john093e committed Aug 3, 2024
1 parent 4d9b9dd commit 6f74eeb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
19 changes: 13 additions & 6 deletions apps/nextjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions apps/nextjs/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ export default function HomePage() {
return (
<main className="container h-screen py-16">
<div className="flex flex-col items-center justify-center gap-4 max-w-lg text-center w-full mx-auto ">
<h1 className="text-5xl font-extrabold tracking-tight sm:text-[5rem]">
<h1 className="text-5xl font-extrabold tracking-tight sm:text-[5rem] mb-2">
Next Js using Zoid
</h1>
<p>This website expose 2 Zoid components to the followinng website : <Link href="https://third-part-nextjs-zoid.vercel.app">third-part-nextjs-zoid.vercel.app</Link></p>
<p>This website expose 2 Zoid components used by the following website: <Link href="https://third-part-nextjs-zoid.vercel.app">third-part-nextjs-zoid.vercel.app</Link></p>
</div>
</main>
);
Expand Down

0 comments on commit 6f74eeb

Please sign in to comment.