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.
32 lines
1.1 KiB
JSON
32 lines
1.1 KiB
JSON
{
|
|
"name": "tansy-ui-monorepo",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"description": "Tansy UI: the @openkhalix/tansy-ui package, its Storybook and its landing page.",
|
|
"license": "MIT",
|
|
"workspaces": [
|
|
"packages/*",
|
|
"apps/*"
|
|
],
|
|
"scripts": {
|
|
"dev": "npm run dev -w @tansy/site",
|
|
"storybook": "npm run dev -w @tansy/docs",
|
|
"build": "npm run build -w @openkhalix/tansy-ui && npm run build -w @tansy/site && npm run build -w @tansy/docs",
|
|
"build:lib": "npm run build -w @openkhalix/tansy-ui",
|
|
"build:site": "npm run build -w @tansy/site",
|
|
"build:docs": "npm run build -w @tansy/docs",
|
|
"test": "npm test -w @openkhalix/tansy-ui",
|
|
"typecheck": "npm run typecheck -w @openkhalix/tansy-ui && tsc -p apps/site/tsconfig.json --noEmit",
|
|
"lint": "oxlint packages apps",
|
|
"check:stories": "node scripts/check-stories.mjs",
|
|
"test:package": "node scripts/test-package.mjs"
|
|
},
|
|
"devDependencies": {
|
|
"axe-core": "^4.13.0",
|
|
"oxlint": "^1.81.0",
|
|
"playwright": "^1.63.0",
|
|
"typescript": "~6.0.2"
|
|
}
|
|
}
|