You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -6,74 +6,53 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
6
6
7
7
Codemod to transform styled-components to StyleX using jscodeshift.
8
8
9
-
## Tech Stack
10
-
11
-
-**Runtime**: Node.js >=22.20
12
-
-**Package Manager**: pnpm >=10.22.0
13
-
-**Language**: TypeScript (ESM)
14
-
-**Build**: tsdown
15
-
-**Test**: vitest
16
-
-**Lint**: oxlint
17
-
-**Visual Testing**: Storybook 10
18
-
-**Codemod Framework**: jscodeshift
19
-
20
9
## Commands
21
10
22
11
```bash
23
12
pnpm install # Install dependencies
24
-
pnpm build # Build with tsdown
25
13
pnpm test# Run tests (watch mode)
26
14
pnpm test:run # Run tests once (no rebuild needed - uses source directly)
27
-
pnpm typecheck # Type check with tsc
28
-
pnpm lint # Lint with oxlint
29
-
pnpm run ci # Run lint + typecheck + test
15
+
pnpm typecheck # Type check
16
+
pnpm lint:fix# Lint with auto fixes applied
17
+
pnpm run ci # Run lint + typecheck + test + build
30
18
pnpm storybook # Start Storybook dev server (port 6006)
31
19
```
32
20
33
21
**Note**: Tests run against source files directly (via vitest), so `pnpm test:run` does NOT require rebuilding. Only `node scripts/debug-test.mjs` requires a prior build.
34
22
35
-
## Project Structure
23
+
## Transformation Goals
36
24
37
-
```
38
-
src/
39
-
├── index.ts # Main exports
40
-
├── transform.ts # Transform implementation
41
-
├── __tests__/transform.test.ts # Test runner (auto-discovers test cases)
42
-
├── run.ts # Programmatic runner (runTransform)
43
-
└── adapter.ts # Adapter API (value resolution + dynamic handlers)
- Dynamic props/interpolations → StyleX variants or dynamic styles
30
+
-`keyframes` → `stylex.keyframes()`
31
+
- Theme values → CSS variables or `stylex.createTheme()`
32
+
-`css` helper → Plain style objects
33
+
-`.attrs()` → Inline props on element
60
34
61
35
## Scripts
62
36
37
+
Run repo scripts directly with `node`.
38
+
63
39
-`scripts/debug-test.mjs` - Generates `.actual.tsx` files for failing test cases to compare against expected `.output.tsx` files. Run with `node scripts/debug-test.mjs` after `pnpm build`.
0 commit comments