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
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Project Overview
6
+
7
+
ts-syntax-highlighter is a blazing-fast, TypeScript-native syntax highlighter with comprehensive grammar support for 6 modern web languages (JavaScript/JSX, TypeScript/TSX, HTML, CSS, JSON, STX). Built for performance with both synchronous and asynchronous tokenization modes.
8
+
9
+
## Monorepo Structure
10
+
11
+
This is a Bun-based monorepo with workspaces:
12
+
-`packages/ts-syntax-highlighter/` - Main syntax highlighter library
13
+
-`packages/benchmarks/` - Performance benchmarking suite
14
+
-`docs/` - VitePress documentation
15
+
16
+
Within `packages/ts-syntax-highlighter/`:
17
+
-`src/` - Source code with modular architecture
18
+
-`test/` - Test files (416 tests total)
19
+
-`bin/` - CLI implementation
20
+
-`examples/` - Usage examples
21
+
22
+
## Development Commands
23
+
24
+
```bash
25
+
# Build the library (uses build.ts with bun-plugin-dtsx)
26
+
bun run build
27
+
28
+
# Run all tests (uses Bun's native test runner)
29
+
bun test
30
+
31
+
# Type checking
32
+
bun run typecheck
33
+
34
+
# Linting
35
+
bun run lint
36
+
bun run lint:fix
37
+
38
+
# Run benchmarks
39
+
bun run bench
40
+
41
+
# Documentation
42
+
bun run dev:docs
43
+
bun run build:docs
44
+
```
45
+
46
+
### Testing Commands
47
+
48
+
Run all tests:
49
+
```bash
50
+
bun test
51
+
```
52
+
53
+
Run a specific test file:
54
+
```bash
55
+
bun test packages/ts-syntax-highlighter/test/tokenizer.test.ts
0 commit comments