Skip to content

Commit a5505d6

Browse files
feat(scaffold): add @/ path alias, panda codegen on prepare, styled-system in .gitignore
1 parent 551f69c commit a5505d6

5 files changed

Lines changed: 147 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ __pycache__/
1313

1414
# ── Build outputs ────────────────────────────────────────
1515
dist/
16+
styled-system/
1617
build/
1718
out/
1819
target/

package.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"name": "@version14/ui",
3+
"version": "0.0.1",
4+
"description": "Version14 design system — shared UI primitives for all Version14 products",
5+
"license": "MIT",
6+
"type": "module",
7+
"exports": {
8+
".": {
9+
"types": "./dist/index.d.ts",
10+
"import": "./dist/index.js",
11+
"require": "./dist/index.cjs"
12+
},
13+
"./preset": {
14+
"types": "./dist/preset.d.ts",
15+
"import": "./dist/preset.js",
16+
"require": "./dist/preset.cjs"
17+
}
18+
},
19+
"main": "./dist/index.cjs",
20+
"module": "./dist/index.js",
21+
"types": "./dist/index.d.ts",
22+
"files": [
23+
"dist"
24+
],
25+
"packageManager": "pnpm@10.11.0",
26+
"engines": {
27+
"node": ">=20",
28+
"pnpm": ">=10"
29+
},
30+
"scripts": {
31+
"prepare": "panda codegen",
32+
"codegen": "panda codegen",
33+
"build": "tsup",
34+
"dev": "tsup --watch",
35+
"type-check": "tsc --noEmit",
36+
"lint": "biome check src",
37+
"lint:fix": "biome check --write src",
38+
"format": "biome format --write src",
39+
"test": "vitest run",
40+
"test:watch": "vitest",
41+
"storybook": "storybook dev -p 6006",
42+
"build-storybook": "storybook build"
43+
},
44+
"peerDependencies": {
45+
"@pandacss/dev": ">=0.45",
46+
"react": ">=18",
47+
"react-dom": ">=18"
48+
},
49+
"devDependencies": {
50+
"@biomejs/biome": "^2.4.15",
51+
"@changesets/cli": "^2.27.1",
52+
"@chromatic-com/storybook": "^3.2.2",
53+
"@pandacss/dev": "^0.45.0",
54+
"@solar-icons/react": "^1.1.1",
55+
"@storybook/addon-essentials": "^8.4.7",
56+
"@storybook/addon-interactions": "^8.4.7",
57+
"@storybook/addon-themes": "^8.4.7",
58+
"@storybook/react": "^8.4.7",
59+
"@storybook/react-vite": "^8.4.7",
60+
"@storybook/test": "^8.4.7",
61+
"@testing-library/jest-dom": "^6.6.3",
62+
"@testing-library/react": "^16.1.0",
63+
"@testing-library/user-event": "^14.5.2",
64+
"@types/react": "^18.3.12",
65+
"@types/react-dom": "^18.3.1",
66+
"@vitejs/plugin-react": "^4.3.3",
67+
"jsdom": "^25.0.1",
68+
"react": "^18.3.1",
69+
"react-dom": "^18.3.1",
70+
"storybook": "^8.4.7",
71+
"tsup": "^8.3.5",
72+
"typescript": "^5.7.2",
73+
"vite": "^6.0.3",
74+
"vitest": "^2.1.6"
75+
},
76+
"dependencies": {
77+
"@ark-ui/react": "^4.1.0",
78+
"shiki": "^1.24.0"
79+
}
80+
}

tsconfig.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2020",
4+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
5+
"module": "ESNext",
6+
"moduleResolution": "bundler",
7+
"jsx": "react-jsx",
8+
"strict": true,
9+
"skipLibCheck": true,
10+
"declaration": true,
11+
"declarationMap": true,
12+
"sourceMap": true,
13+
"esModuleInterop": true,
14+
"allowSyntheticDefaultImports": true,
15+
"isolatedModules": true,
16+
"noUnusedLocals": true,
17+
"noUnusedParameters": true,
18+
"noImplicitReturns": true,
19+
"exactOptionalPropertyTypes": false,
20+
"paths": {
21+
"@/*": ["./*"]
22+
}
23+
},
24+
"include": ["src", "styled-system"],
25+
"exclude": ["node_modules", "dist", ".storybook", "src/**/*.stories.*", "src/**/*.test.*"]
26+
}

tsup.config.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import path from "node:path";
2+
import { defineConfig } from "tsup";
3+
4+
export default defineConfig([
5+
{
6+
entry: { index: "src/index.ts" },
7+
format: ["esm", "cjs"],
8+
dts: true,
9+
sourcemap: true,
10+
clean: true,
11+
external: ["react", "react-dom", "@pandacss/dev"],
12+
esbuildOptions(options) {
13+
options.alias = { "@": path.resolve(import.meta.dirname, ".") };
14+
},
15+
},
16+
{
17+
entry: { preset: "src/preset.ts" },
18+
format: ["esm", "cjs"],
19+
dts: true,
20+
sourcemap: true,
21+
external: ["@pandacss/dev"],
22+
},
23+
]);

vitest.config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import path from "node:path";
2+
import react from "@vitejs/plugin-react";
3+
import { defineConfig } from "vitest/config";
4+
5+
export default defineConfig({
6+
plugins: [react()],
7+
resolve: {
8+
alias: {
9+
"@": path.resolve(import.meta.dirname, "."),
10+
},
11+
},
12+
test: {
13+
environment: "jsdom",
14+
globals: true,
15+
setupFiles: ["./src/test/setup.ts"],
16+
},
17+
});

0 commit comments

Comments
 (0)