arch-tsdown

Create ESM TypeScript libraries with tsdown builds and Vitest tests.

8|Updated Aug 21, 2023
One-click install
npx skills add https://github.com/seanmcquaid/scaffolding-templates --skill arch-tsdown
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: arch-tsdown
Source: https://github.com/seanmcquaid/scaffolding-templates/tree/main/.agents/skills/arch-tsdown
Command: npx skills add https://github.com/seanmcquaid/scaffolding-templates --skill arch-tsdown

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill simplifies the process of starting a TypeScript library project, providing an opinionated setup that covers TypeScript, building, testing, and releasing practices.

Core Features & Use Cases

  • ESM-only Library: Supports modern JavaScript module standards and outputs an ESM format library.
  • tsdown Configuration: Utilizes tsdown for building with ESM and TypeScript declaration generation.
  • Vitest Integration: Includes testing support using Vitest with automatic package export snapshot patterns.
  • npm Trusted Publisher: Recommended for automated CI-based publishing for security and ease.
  • Use Case: For developers who want to create and maintain a TypeScript library with best practices, including tooling configuration and workflows for efficient development.

Quick Start

Use the arch-tsdown skill to start a new TypeScript library project:

npx degit https://github.com/antfu/starter-ts my-ts-library
cd my-ts-library
npx skills add seanmcquaid/scaffolding-templates --all -a github-copilot

Frequently Asked Questions about arch-tsdown

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

FAQPage Schema
How do I create a modern TypeScript library with ESM only output?

To create a modern TypeScript library with ESM only output, you can use an opinionated starter setup that utilizes tsdown for building and automatically generates TypeScript declarations for your package exports.

What is the best way to configure tsdown for a TypeScript library?

Configuring tsdown for a TypeScript library involves utilizing it to handle your builds with ESM formatting and TypeScript declaration generation, ensuring your package exports are validated and compliant with modern JavaScript module standards.

How does Vitest testing integrate with TypeScript library package exports?

Vitest integrates with a TypeScript library by providing testing support that includes automatic package export snapshot patterns, ensuring your ESM module outputs remain valid and preventing export configuration regressions during development.

Can I use npm trusted publisher for automated CI-based TypeScript library releases?

Yes, using npm trusted publisher is recommended for automated CI-based publishing of your TypeScript library, providing a secure and streamlined workflow to release ESM packages without manual token management.

Does the antfu starter-ts template support ESM compliance and linting out of the box?

Yes, the antfu starter-ts template provides an opinionated setup that outputs ESM libraries and performs linting, testing, and package exports validation automatically out of the box to enforce best practices.