Restructure the repo into npm workspaces so the component kit publishes as its own package, like MUI and shadcn/ui: - packages/ui: @openkhalix/tansy-ui (published), with components, stories, tests, tokens and the library build - packages/brand: private logo and catalogue data shared by both apps - apps/site: the landing page - apps/docs: Storybook The package: - MIT licence (copyright OpenKhalix) - per-component ES modules and type declarations - "use client" on component modules so they import into Next.js Server Components; helpers stay server-safe - tokens.css for Tailwind v4 apps, and a prebuilt styles.css for apps without Tailwind - lucide-react 1.x, whose types compile against current React 19 types The apps resolve the package through a "source" export condition, so they hot-reload component edits, while outside users get dist/. scripts/test-package.mjs packs the package and installs the tarball into Vite + Tailwind (strict types), plain React and Next.js apps; each must build and render correctly. Gitea workflows run CI on push and publish to npm when a vX.Y.Z tag matching the package version is pushed.
34 lines
768 B
JSON
34 lines
768 B
JSON
{
|
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
"plugins": [
|
|
"react",
|
|
"typescript",
|
|
"oxc"
|
|
],
|
|
"rules": {
|
|
"react/rules-of-hooks": "error",
|
|
"react/only-export-components": [
|
|
"warn",
|
|
{
|
|
"allowConstantExport": true
|
|
}
|
|
]
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": [
|
|
"packages/ui/src/components/Card.tsx",
|
|
"packages/ui/src/components/Dialog.tsx",
|
|
"packages/ui/src/components/Drawer.tsx",
|
|
"packages/ui/src/components/DropdownMenu.tsx",
|
|
"packages/ui/src/components/Popover.tsx",
|
|
"packages/ui/src/components/Table.tsx",
|
|
"packages/ui/src/components/Tabs.tsx"
|
|
],
|
|
"rules": {
|
|
"react/only-export-components": "off"
|
|
}
|
|
}
|
|
]
|
|
}
|