[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-70696":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":15,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},70696,"tsdx","jaredpalmer\u002Ftsdx","jaredpalmer","Zero-config CLI for TypeScript package development","https:\u002F\u002Ftsdx.io",null,"TypeScript",11467,503,40,4,0,1,43.11,"MIT License",false,"master",[23,24,25,26,27,28,29,30,31],"bundling","jest","npm","packaging","react","react-dom","rollup","typescript","yarn","2026-06-12 02:02:42","# TSDX\n\nZero-config CLI for TypeScript package development.\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fjaredpalmer\u002Ftsdx\u002Factions\u002Fworkflows\u002Fnodejs.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fjaredpalmer\u002Ftsdx\u002Factions\u002Fworkflows\u002Fnodejs.yml)\n[![npm](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Ftsdx.svg)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Ftsdx)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-blue.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n\nModern TypeScript library development, simplified. TSDX provides a zero-config CLI that helps you develop, test, and publish TypeScript packages with ease.\n\n> **TSDX 2.0** is a complete rewrite using modern, high-performance Rust-based tooling. See the [Migration Guide](.\u002FMIGRATION.md) if upgrading from v0.x\n\n## Features\n\n- **Zero config** - Sensible defaults, just start coding\n- **Modern tooling** - Built on [bunchee](https:\u002F\u002Fgithub.com\u002Fhuozhi\u002Fbunchee), [vitest](https:\u002F\u002Fvitest.dev\u002F), [oxlint](https:\u002F\u002Foxc.rs\u002Fdocs\u002Fguide\u002Fusage\u002Flinter.html), and [oxfmt](https:\u002F\u002Foxc.rs\u002Fdocs\u002Fguide\u002Fusage\u002Fformatter)\n- **Dual ESM\u002FCJS** - Automatic dual module builds with proper exports\n- **TypeScript first** - Full TypeScript support with declaration generation\n- **Lightning fast** - Rust-powered linting (50-100x faster than ESLint) and formatting (35x faster than Prettier)\n- **Bun-native** - Uses bun for package management\n- **Modern Node.js** - Supports Node.js 20+ (LTS)\n\n## Quick Start\n\n```bash\n# Create a new package\nbunx tsdx create mylib\n\n# Navigate to the project\ncd mylib\n\n# Start development\nbun run dev\n```\n\nThat's it! Start editing `src\u002Findex.ts` and build your library.\n\n## Installation\n\n### Global Installation (recommended for creating projects)\n\n```bash\nbun add -g tsdx\n```\n\n### Per-Project Installation\n\n```bash\nbun add -D tsdx\n```\n\n## Commands\n\n### `tsdx create \u003Cname>`\n\nCreate a new TypeScript package from a template.\n\n```bash\n# Interactive template selection\nbunx tsdx create mylib\n\n# Specify template directly\nbunx tsdx create mylib --template react\n```\n\n**Available Templates:**\n\n| Template | Description |\n|----------|-------------|\n| `basic` | A basic TypeScript library with vitest |\n| `react` | A React component library with Testing Library |\n\n### `tsdx build`\n\nBuild the package for production using [bunchee](https:\u002F\u002Fgithub.com\u002Fhuozhi\u002Fbunchee).\n\n```bash\ntsdx build\n\n# Skip cleaning dist folder\ntsdx build --no-clean\n```\n\nOutputs ESM and CommonJS formats with TypeScript declarations.\n\n### `tsdx dev` \u002F `tsdx watch`\n\nStart development mode with file watching.\n\n```bash\ntsdx dev\n```\n\nRebuilds automatically when files change.\n\n### `tsdx test`\n\nRun tests using [vitest](https:\u002F\u002Fvitest.dev\u002F).\n\n```bash\n# Run tests once\ntsdx test\n\n# Watch mode\ntsdx test --watch\n\n# With coverage\ntsdx test --coverage\n\n# Update snapshots\ntsdx test --update\n```\n\n### `tsdx lint`\n\nLint the codebase using [oxlint](https:\u002F\u002Foxc.rs\u002Fdocs\u002Fguide\u002Fusage\u002Flinter.html).\n\n```bash\n# Lint src and test directories (default)\ntsdx lint\n\n# Lint specific paths\ntsdx lint src lib\n\n# Auto-fix issues\ntsdx lint --fix\n\n# Use custom config\ntsdx lint --config .oxlintrc.json\n```\n\n### `tsdx format`\n\nFormat the codebase using [oxfmt](https:\u002F\u002Foxc.rs\u002Fdocs\u002Fguide\u002Fusage\u002Fformatter).\n\n```bash\n# Format all files\ntsdx format\n\n# Check formatting without changes\ntsdx format --check\n\n# Format specific paths\ntsdx format src test\n```\n\n### `tsdx typecheck`\n\nRun TypeScript type checking.\n\n```bash\ntsdx typecheck\n\n# Watch mode\ntsdx typecheck --watch\n```\n\n### `tsdx init`\n\nInitialize tsdx configuration in an existing project.\n\n```bash\nbunx tsdx init\n```\n\nThis adds the necessary configuration to your `package.json`, creates `tsconfig.json` and `vitest.config.ts` if they don't exist.\n\n## Project Structure\n\nProjects created with tsdx follow this structure:\n\n```\nmylib\u002F\n├── src\u002F\n│   └── index.ts          # Library entry point\n├── test\u002F\n│   └── index.test.ts     # Tests (vitest)\n├── dist\u002F                  # Build output (generated)\n│   ├── index.js          # ESM\n│   ├── index.cjs         # CommonJS\n│   └── index.d.ts        # TypeScript declarations\n├── .github\u002F\n│   └── workflows\u002F        # CI\u002FCD workflows\n├── package.json\n├── tsconfig.json\n├── vitest.config.ts\n├── LICENSE\n└── README.md\n```\n\n### React Template Additional Structure\n\n```\nmylib\u002F\n├── src\u002F\n│   └── index.tsx         # React component entry\n├── test\u002F\n│   └── index.test.tsx    # Tests with Testing Library\n├── example\u002F              # Demo app (Vite-powered)\n│   ├── index.tsx\n│   ├── index.html\n│   ├── package.json\n│   └── vite.config.ts\n└── ...\n```\n\n## Module Formats\n\nTSDX outputs both ESM and CommonJS formats:\n\n| File | Format | Usage |\n|------|--------|-------|\n| `dist\u002Findex.js` | ESM | Modern bundlers, Node.js with `type: \"module\"` |\n| `dist\u002Findex.cjs` | CommonJS | Legacy Node.js, older bundlers |\n| `dist\u002Findex.d.ts` | TypeScript | Type definitions |\n| `dist\u002Findex.d.cts` | TypeScript | CJS type definitions |\n\nThe `package.json` exports field is configured automatically:\n\n```json\n{\n  \"type\": \"module\",\n  \"main\": \".\u002Fdist\u002Findex.cjs\",\n  \"module\": \".\u002Fdist\u002Findex.js\",\n  \"types\": \".\u002Fdist\u002Findex.d.ts\",\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \".\u002Fdist\u002Findex.d.ts\",\n        \"default\": \".\u002Fdist\u002Findex.js\"\n      },\n      \"require\": {\n        \"types\": \".\u002Fdist\u002Findex.d.cts\",\n        \"default\": \".\u002Fdist\u002Findex.cjs\"\n      }\n    },\n    \".\u002Fpackage.json\": \".\u002Fpackage.json\"\n  }\n}\n```\n\n## Tool Stack\n\nTSDX 2.0 uses modern, high-performance tools:\n\n| Tool | Purpose | Performance |\n|------|---------|-------------|\n| [bunchee](https:\u002F\u002Fgithub.com\u002Fhuozhi\u002Fbunchee) | Bundling | Zero-config, built on Rollup + SWC |\n| [vitest](https:\u002F\u002Fvitest.dev\u002F) | Testing | Vite-native, Jest-compatible API |\n| [oxlint](https:\u002F\u002Foxc.rs\u002Fdocs\u002Fguide\u002Fusage\u002Flinter.html) | Linting | 50-100x faster than ESLint |\n| [oxfmt](https:\u002F\u002Foxc.rs\u002Fdocs\u002Fguide\u002Fusage\u002Fformatter) | Formatting | 35x faster than Prettier |\n| [bun](https:\u002F\u002Fbun.sh\u002F) | Package Management | Native speed, npm-compatible |\n\n## Configuration\n\n### TypeScript (`tsconfig.json`)\n\nTSDX creates a modern TypeScript configuration:\n\n```json\n{\n  \"compilerOptions\": {\n    \"target\": \"ES2022\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"strict\": true,\n    \"declaration\": true,\n    \"declarationMap\": true\n  }\n}\n```\n\n### Vitest (`vitest.config.ts`)\n\nDefault test configuration:\n\n```typescript\nimport { defineConfig } from 'vitest\u002Fconfig';\n\nexport default defineConfig({\n  test: {\n    globals: true,\n    environment: 'node', \u002F\u002F or 'jsdom' for React\n  },\n});\n```\n\n### Linting (`.oxlintrc.json`)\n\nOptional oxlint configuration:\n\n```json\n{\n  \"rules\": {\n    \"no-unused-vars\": \"warn\"\n  }\n}\n```\n\n### Formatting (`.oxfmtrc.json`)\n\nOptional oxfmt configuration:\n\n```json\n{\n  \"indentWidth\": 2,\n  \"lineWidth\": 100\n}\n```\n\n## Requirements\n\n- **Node.js**: 20+ (LTS)\n- **Bun**: Latest version\n\n### Installing Bun\n\n```bash\n# macOS\u002FLinux\ncurl -fsSL https:\u002F\u002Fbun.sh\u002Finstall | bash\n\n# Windows\npowershell -c \"irm bun.sh\u002Finstall.ps1 | iex\"\n\n# npm (alternative)\nnpm install -g bun\n```\n\n## Migrating from TSDX v0.x\n\nSee the [Migration Guide](.\u002FMIGRATION.md) for detailed instructions on upgrading from the original TSDX.\n\n**Quick summary:**\n1. Install bun\n2. Update `package.json` scripts to use tsdx commands\n3. Replace Jest with vitest\n4. Replace ESLint with oxlint (optional)\n5. Replace Prettier with oxfmt (optional)\n6. Run `bun install`\n\n## Publishing\n\n```bash\n# Build the package\nbun run build\n\n# Publish to npm\nnpm publish\n```\n\nWe recommend using [np](https:\u002F\u002Fgithub.com\u002Fsindresorhus\u002Fnp) or [changesets](https:\u002F\u002Fgithub.com\u002Fchangesets\u002Fchangesets) for publishing.\n\n## FAQ\n\n### Why bun?\n\nBun provides significantly faster package installation and script execution. It's compatible with npm packages and the Node.js ecosystem.\n\n### Can I still use npm\u002Fyarn\u002Fpnpm?\n\nThe generated projects use bun for package management, but the built packages are compatible with any package manager. Your library consumers can use npm, yarn, pnpm, or bun.\n\n### Why oxlint instead of ESLint?\n\noxlint is 50-100x faster than ESLint while catching the most important issues. For comprehensive linting, you can still use ESLint alongside oxlint.\n\n### Is this compatible with the old TSDX?\n\nThe build output format is fully compatible. Your library consumers won't notice any difference. However, the development workflow and configuration are different.\n\n## Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](.\u002FCONTRIBUTING.md) for guidelines.\n\n## Acknowledgments\n\nTSDX 2.0 is built on the shoulders of giants:\n\n- [bunchee](https:\u002F\u002Fgithub.com\u002Fhuozhi\u002Fbunchee) by Jiachi Liu\n- [vitest](https:\u002F\u002Fvitest.dev\u002F) by the Vitest team\n- [oxc](https:\u002F\u002Foxc.rs\u002F) by the OXC team\n- [bun](https:\u002F\u002Fbun.sh\u002F) by the Bun team\n\n## Author\n\n- [Jared Palmer](https:\u002F\u002Ftwitter.com\u002Fjaredpalmer)\n\n## License\n\n[MIT](.\u002FLICENSE)\n","TSDX 是一个用于 TypeScript 包开发的零配置命令行工具。它提供了现代化的工具链，包括基于 Rust 的高性能构建、测试和格式化工具，支持自动化的双模块（ESM\u002FCJS）构建，并且完全兼容 TypeScript 以及声明文件生成。TSDX 特别适用于希望快速启动并高效维护 TypeScript 库或组件库的开发者，在确保代码质量和性能的同时大幅简化了配置工作。无论是创建基本的 TypeScript 库还是 React 组件库，TSDX 都能提供流畅的开发体验。",2,"2026-06-11 03:33:39","high_star"]