Getting started
Installation
Prerequisites
- Node.js version 18 or higher.
- A package manager: e.g. npm, pnpm, ...
sh
$ npm add @ogs-gmbh/guthriesh
$ pnpm add @ogs-gmbh/guthriesh
$ yarn add @ogs-gmbh/guthriesh
$ bun add @ogs-gmbh/guthrieUsage
Guthrie offers almost any kind of expression, that can be done JavaScript-wise. Here, we provide just a simple example. Refer to our reference get a better understanding.
example-component.tsx
tsx
import { Guthrie } from "@ogs-gmbh/guthrie";
import type { Page } from "@ogs-gmbh/guthrie";
const page = {
route: "example-route",
content: {
element: "main",
children: [
{
element: "h1",
children: [
{
element: "text",
content: "Hello to Guthries Stage"
}
]
}
]
}
} satisfies Page;
export function ExampleComponent() {
return <Guthrie page={page} elements={{}} fns={{}} operators={{}} />;
}