This is a custom programming language that compiles to Next.js code. See ./index.meta for more details on the syntax.
You must have an existing Next.js application with shadcn ui and Tailwind CSS setup. You can then copy the ./runtime.tsx to where your pages are. If you use App router, the runtime must be in your-next-app/src/app/runtime.tsx. You must also have a ThemeProvider (from shadcn) located in your-next-app/src/components/theme-provider.tsx. You can put the code below into that file:
"use client"
import * as React from "react"
import { ThemeProvider as NextThemesProvider } from "next-themes"
export function ThemeProvider({
children,
...props
}: React.ComponentProps<typeof NextThemesProvider>) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
}Then you can compile your .meta source file.
$ go run . index.meta your-next-app/src/appThe code will be generated in the appropriate files and folders. If important files or folders don't exist, the compiler will create them for you.