typescript

Build TypeScript packages with SWC, tsconfig, and ESM output.

9|2|Updated Apr 13, 2024
One-click install
npx skills add https://github.com/JacobLey/leyman --skill typescript-jacobley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/JacobLey/leyman/tree/main/.claude/skills/typescript
Command: npx skills add https://github.com/JacobLey/leyman --skill typescript-jacobley

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript packaging in large repos can be error-prone and slow without a unified build strategy. This Skill provides a guided approach to building TypeScript packages using SWC, tsconfig, and ESM, ensuring fast, consistent bundles across packages.

Core Features & Use Cases

  • SWC-based transpilation to produce fast, standards-compliant output for TS code.
  • Centralized build configuration (tsconfig.build.json, configs/swcrc.jsonc, nx.json) to standardize across packages.
  • Node.js ES Module friendly outputs with reliable interop for downstream consumers.
  • Linting and type-safety expectations maintained during build to improve reliability.

Quick Start

Run the build workflow to compile all packages with SWC and emit ES modules.

Frequently Asked Questions about typescript

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build TypeScript packages with SWC in an Nx monorepo?

Build TypeScript packages using SWC by applying centralized configurations like tsconfig.build.json and nx.json to standardize transpilation across monorepo packages, producing fast and consistent ESM output for Node.js runtimes.

What is the best way to output ESM from TypeScript libraries reliably?

Outputting ESM from TypeScript libraries is handled reliably via SWC-based transpilation combined with centralized tsconfig settings, ensuring standards-compliant ES modules with dependable interop for downstream consumers.

Does this SWC build approach maintain linting and type-safety during compilation?

Yes, the SWC build approach maintains linting and type-safety expectations during compilation to improve reliability across packages in the monorepo while emitting fast, standards-compliant output.

How does SWC compare to standard TypeScript compilers for packaging monorepos?

SWC transpiles TypeScript faster than standard compilers by aligning with centralized tsconfig and Nx-based build tooling, ensuring consistent bundles across packages without the slow build times of traditional compilation.

Can I standardize build configuration across multiple TypeScript packages?

You can standardize build configuration across multiple TypeScript packages by using centralized files like configs/swcrc.jsonc and tsconfig.build.json, ensuring all packages produce reliable, environment-compatible artifacts.