[![logo][]](https://xylabs.com)

# @xylabs/toolchain

[![npm][npm-badge]][npm-link]
[![license][license-badge]][license-link]

> Unified TypeScript toolchain for XY Labs — build, lint, test, deploy with auto-detected package manager and React support

## Install

Using npm:

```sh
npm install {{name}}
```

Using yarn:

```sh
yarn add {{name}}
```

Using pnpm:

```sh
pnpm add {{name}}
```

Using bun:

```sh
bun add {{name}}
```

## Extending `package-compile` / `package-build` / `package-recompile`

To add steps to a per-package build phase, override the matching script in your package's `package.json` and chain to the toolchain default via the matching `-only` bin:

```json
{
  "scripts": {
    "package-compile": "package-compile-only && tsx scripts/generate-types.ts"
  }
}
```

Do **not** call `pnpm package-compile` / `yarn package-compile` / `pnpm run package-compile` from the override — those re-enter the same npm script and recurse infinitely. The `-only` bin variants exist precisely so your override can invoke the toolchain default once and add work around it.

Available `-only` variants: `package-compile-only`, `package-build-only`, `package-recompile-only`.


## License

See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).

## Credits

[Made with 🔥 and ❄️ by XY Labs](https://xylabs.com)

[npm-badge]: https://img.shields.io/npm/v/@xylabs/toolchain.svg
[npm-link]: https://www.npmjs.com/package/@xylabs/toolchain
[license-badge]: https://img.shields.io/npm/l/@xylabs/toolchain.svg
[license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
[logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
