# Developer Documentation

This document provides information for developers who want to contribute to the `ecsjs` project.

## Development Tasks

The project uses a task runner to manage common development operations. These tasks are defined in `tasks.yml`.

## Getting Started

1.  **Install dependencies**:
    ```bash
    npm install
    ```

2.  **Run tests**:
    ```bash
    npx task test
    ```
    *(Note: `npm test` typically maps to `task test` in this project's configuration)*

3.  **Build the project**:
    ```bash
    npx task bundle
    ```


### Build Tasks

- **`task compile`**: Cleans the output directories and compiles the TypeScript source code.
- **`task compile:types`**: Compiles the TypeScript type definitions.
- **`task compile:docs`**: Generates reference documentation using TypeDoc.
- **`task bundle`**: Compiles types and creates a bundled distribution using esbuild.
- **`task bundle:dev`**: Creates a development un-minified bundle.
- **`task clean`**: Removes all generated directories (`public`, `out`, `dist`, `coverage`, etc.).

### Testing and Coverage

- **`task test`**: Compiles the project and runs the unit tests.
- **`task coverage`**: Runs tests with code coverage reporting.

## Project Structure

- `src/`: Core library source code.
- `test/`: Unit tests and test runner.
- `build/`: Build configuration and scripts.
- `docs/`: Documentation.

## See Also

- [Cheat Sheet](./cheat-sheet.md)
- [API Reference Documentation](https://ecsjs.gitlab.io/ecs)
