Files
ADS3-Design-System/package.json
Richie 69751eb6f2 Add library build for package distribution
Add a separate Vite library build (vite.lib.config.ts + `build:lib`) that
bundles src/index.ts to ESM with React/react-dom externalised and the 97
internal `@/` imports resolved at build time, plus type declarations and
copies of tokens.css / typography.css into dist. Point package.json
exports/main/types at dist and make react a peer dependency, so ADS can be
consumed as an installed package (@geljic/ads3-design-system) rather than a
file: + `@/` alias dependency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 12:44:26 +10:00

75 lines
2.1 KiB
JSON

{
"name": "ads3-design-system",
"private": true,
"version": "0.1.0",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
"files": [
"dist"
],
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/index.js"
},
"./tokens": "./dist/tokens.css",
"./typography": "./dist/typography.css"
},
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build:lib": "vite build --config vite.lib.config.ts && cp src/tokens/tokens.css src/styles/typography.css dist/",
"lint": "eslint .",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"peerDependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"dependencies": {
"@floating-ui/react": "^0.27.19",
"@fontsource-variable/public-sans": "^5.2.7",
"@tailwindcss/vite": "^4.3.0",
"clsx": "^2.1.1",
"tailwind-merge": "^3.6.0",
"tailwindcss": "^4.3.0"
},
"devDependencies": {
"@chromatic-com/storybook": "^5.2.1",
"@eslint/js": "^10.0.1",
"@microsoft/api-extractor": "^7.58.7",
"@storybook/addon-a11y": "^10.4.0",
"@storybook/addon-designs": "^11.1.3",
"@storybook/addon-docs": "^10.4.0",
"@storybook/addon-mcp": "^0.6.0",
"@storybook/addon-vitest": "^10.4.0",
"@storybook/react-vite": "^10.4.0",
"@types/node": "^24.12.3",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.1",
"@vitest/browser-playwright": "^4.1.6",
"@vitest/coverage-v8": "^4.1.6",
"eslint": "^10.3.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.2",
"eslint-plugin-storybook": "^10.4.0",
"globals": "^17.6.0",
"lucide-react": "^1.16.0",
"playwright": "^1.60.0",
"prettier": "^3.8.3",
"prettier-plugin-tailwindcss": "^0.8.0",
"storybook": "^10.4.0",
"typescript": "~6.0.2",
"typescript-eslint": "^8.59.2",
"vite": "^8.0.12",
"vite-plugin-dts": "^5.0.2",
"vitest": "^4.1.6"
}
}