typescript/README.md
This directory contains all TypeScript-related packages and applications for BAML, organized as a monorepo managed by Turbo and pnpm.
After the TypeScript refactor, the codebase is organized as follows:
typescript/
├── apps/ # All applications
│ ├── fiddle-web-app/ # Web playground application
│ ├── playground/ # Playground UI
│ └── vscode-ext/ # VSCode extension
├── packages/ # All reusable packages
│ ├── ui/ # Shared UI components
│ ├── common/ # Common utilities
│ ├── playground-common/ # Playground shared code
│ ├── codemirror-lang-baml/ # CodeMirror language support
│ ├── fiddle-proxy/ # Fiddle proxy server
│ └── nextjs-plugin/ # Next.js integration
└── workspace-tools/ # Build and config tools
./scripts/setup-dev.sh
pnpm install
pnpm build
From the root directory:
pnpm dev - Start all development serverspnpm dev:vscode - Develop VSCode extensionpnpm dev:playground - Develop playgroundpnpm dev:language-server - Develop language serverpnpm build - Build all packagespnpm build:fiddle-web-app - Build web app and dependenciespnpm build:vscode - Build VSCode extension and dependenciespnpm clean:ws - Clean all build artifactspnpm typecheck - Run TypeScript type checkingThe VSCode extension is located in typescript/apps/vscode-ext/. To develop:
cd typescript/pnpm ipnpm build:vscodeFor detailed instructions, see CONTRIBUTING.md.
The web playground is located in typescript/apps/fiddle-web-app/. To develop:
cd typescript/apps/fiddle-web-apppnpm devAll shared packages are in typescript/packages/. When developing packages:
pnpm build in the package directorypnpm testpnpm testpnpm clean:ws && pnpm installFor more detailed development instructions, see the main CONTRIBUTING.md guide.