Skip to content

Latest commit

 

History

History
113 lines (73 loc) · 2.48 KB

File metadata and controls

113 lines (73 loc) · 2.48 KB

Contributing to esbuild-coffeescript

Thanks for your interest in contributing! This guide will help you get started.

Getting Started

  1. Fork the repository and clone your fork:

    git clone https://github.com/<your-username>/esbuild-coffeescript.git
    cd esbuild-coffeescript
  2. Install dependencies:

    pnpm install

    This also sets up Lefthook git hooks via the prepare script.

  3. Make sure everything works:

    pnpm run ci

Development Workflow

Branch from master

Create a feature branch for your changes:

git checkout -b feature/my-change

Code Quality

This project uses Ultracite (powered by Biome) for formatting and linting. A pre-commit hook runs automatically to format staged files.

To manually check or fix issues:

# Check for problems
pnpm run check

# Auto-fix formatting and lint issues
pnpm run fix

Testing

All changes should include tests. We use Vitest as the test runner.

# Run tests once
pnpm test

# Watch mode during development
pnpm test:watch

# Generate coverage report
pnpm test:coverage

Building

The project compiles TypeScript to JavaScript:

pnpm build

Full CI Check

Before pushing, run the same checks that CI runs:

pnpm run ci

This runs lint checks, tests, and the build in sequence.

Submitting a Pull Request

  1. Make sure pnpm run ci passes locally.
  2. Write a clear PR description explaining what changed and why.
  3. Keep PRs focused -- one logical change per PR.
  4. If your PR fixes an open issue, reference it in the description (e.g., Fixes #123).

Reporting Bugs

When opening an issue, include:

  • Node.js and pnpm versions
  • esbuild and esbuild-coffeescript versions
  • A minimal reproduction
  • Expected vs. actual behavior

Project Structure

src/index.ts       # Plugin source code
test/              # Test files
dist/              # Compiled output (git-ignored)

The plugin is a single-file esbuild plugin that compiles .coffee and .litcoffee files using the CoffeeScript compiler.

License

By contributing, you agree that your contributions will be licensed under the MIT License.