Skip to content

⚡️ Zero-config ESM/TS package builder. Powered by Oxc, Rolldown and rolldown-plugin-dts. 零配置 ESM/TS 包构建器 基于 Oxc、Rolldown 和 rolldown-plugin-dts 构建,专注于 ESM 兼容性和极速构建

License

Notifications You must be signed in to change notification settings

Sunny-117/robuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

194 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

robuild

📦 robuild 😯 npm

npm version npm downloads License Coverage

English | 简体中文

⚡️ Zero-config ESM/TS package builder. Powered by Oxc, Rolldown and rolldown-plugin-dts.

Features

  • Fast: Built on top of rolldown and oxc
  • 📦 Zero config: Works out of the box, configurable when needed
  • 🎯 TypeScript: First-class TypeScript support with .d.ts generation
  • 🔄 Dual mode: Bundle or transform your source code
  • 🚀 Stub mode: Lightning-fast development with file linking
  • 📤 Exports: Automatic package.json exports generation

Installation

npm install robuild
# or
pnpm add robuild
# or
yarn add robuild

Quick Start

# Bundle your library
npx robuild ./src/index.ts

# Transform source files
npx robuild ./src/runtime/:./dist/runtime

# Watch mode for development
npx robuild ./src/index.ts --watch

Usage

# Bundle your library
npx robuild ./src/index.ts

# Transform source files
npx robuild ./src/runtime/:./dist/runtime

# Watch mode for development
npx robuild ./src/index.ts --watch

Configuration

Create build.config.ts in your project root:

import { defineConfig } from 'robuild'

export default defineConfig({
  entries: [
    {
      type: 'bundle',
      input: './src/index.ts',
      format: ['esm', 'cjs'],
    },
    {
      type: 'transform',
      input: './src/runtime',
      outDir: './dist/runtime',
    },
  ],
})

Documentation

📖 Complete Documentation

Visit our documentation site for detailed guides, API reference, and examples.

Prior Arts

  • unbuild: Stable solution based on rollup and mkdist.
  • tsdown: Alternative bundler based on rolldown.

Test Coverage

File Stmts Branch Funcs Lines
All files 86.44% 80.12% 92.94% 86.32%
src/build.ts 84.15% 67.74% 100.00% 83.54%
src/builders 89.89% 82.80% 96.43% 89.89%
src/config 85.38% 67.96% 100.00% 84.92%
src/core 74.19% 57.14% 68.42% 74.19%
src/plugins 97.50% 95.37% 97.37% 97.46%
src/plugins/builtin 88.15% 84.92% 95.59% 88.12%
src/plugins/extras 96.55% 100.00% 100.00% 96.30%
src/transforms 71.43% 63.77% 81.82% 71.27%
src/utils 88.29% 85.44% 100.00% 88.29%
src/watch.ts 81.48% 81.82% 57.14% 81.48%

Run coverage locally:

pnpm test:coverage

License

💛 MIT License © Sunny-117

About

⚡️ Zero-config ESM/TS package builder. Powered by Oxc, Rolldown and rolldown-plugin-dts. 零配置 ESM/TS 包构建器 基于 Oxc、Rolldown 和 rolldown-plugin-dts 构建,专注于 ESM 兼容性和极速构建

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •