Package Tansy UI as @openkhalix/tansy-ui in a monorepo (v0.4.0)
CI / check (push) Successful in 3m9s
Release / publish (push) Failing after 1m22s

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.
This commit is contained in:
thekhalidsha committed 2026-09-29 09:24:03 +05:30
1 parent 23e67006d3
commit 9255b255a6
214 files changed
+1521 -389

No files matched your search

+18 -59
View File
@@ -1,72 +1,31 @@
{
"name": "tansy-ui",
"name": "tansy-ui-monorepo",
"private": true,
"version": "0.3.1",
"description": "A themeable, accessible React component kit built on Base UI and Tailwind CSS v4.",
"version": "0.0.0",
"type": "module",
"sideEffects": [
"*.css"
],
"module": "./dist-lib/index.js",
"types": "./dist-lib/index.d.ts",
"exports": {
".": {
"types": "./dist-lib/index.d.ts",
"import": "./dist-lib/index.js"
},
"./tokens.css": "./dist-lib/tokens.css",
"./package.json": "./package.json"
},
"files": [
"dist-lib",
"README.md",
"CHANGELOG.md"
"description": "Tansy UI: the @openkhalix/tansy-ui package, its Storybook and its landing page.",
"license": "MIT",
"workspaces": [
"packages/*",
"apps/*"
],
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build:lib": "vite build --config vite.lib.config.ts && tsc -p tsconfig.lib.json && cp src/styles/tokens.css dist-lib/tokens.css",
"lint": "oxlint src .storybook",
"test": "vitest run",
"test:watch": "vitest",
"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",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"peerDependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"dependencies": {
"@base-ui/react": "^1.8.0",
"clsx": "^2.1.1",
"lucide-react": "^0.460.0",
"tailwind-merge": "^3.7.0"
"test:package": "node scripts/test-package.mjs"
},
"devDependencies": {
"@storybook/addon-a11y": "^10.6.0",
"@storybook/addon-docs": "^10.6.0",
"@storybook/react-vite": "^10.6.0",
"@tailwindcss/vite": "^4.3.3",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
"@testing-library/user-event": "^14.6.7",
"@types/node": "^24.13.3",
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.7",
"@vitejs/plugin-react": "^6.1.1",
"axe-core": "^4.13.0",
"jsdom": "^30.1.1",
"oxlint": "^1.81.0",
"playwright": "^1.63.0",
"react": "^19.2.8",
"react-dom": "^19.2.8",
"remark-gfm": "^4.0.1",
"storybook": "^10.6.0",
"tailwindcss": "^4.3.3",
"typescript": "~6.0.2",
"vite": "^8.3.0",
"vitest": "^5.0.2"
"typescript": "~6.0.2"
}
}