# @s-ui/js-compiler

> JavaScript & TypeScript Compiler

Latest version **1.30.0** (published 2025-03-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @s-ui/js-compiler
pnpm add @s-ui/js-compiler
yarn add @s-ui/js-compiler
bun add @s-ui/js-compiler
```

Provides the command `sui-js-compiler`.

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.30.0 |
| Published | 2025-03-27 |
| First published | 2021-09-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 7 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | alejandro.ferrante, ivanmlaborda, salvador.juan, andresin87.adevinta, izeller, gfabregoadv, a.ferrer, ignacio_navarro, oscar_ramirez, jordi.munoz, joanleon-adv, aitor.rodriguez, luis-garrido, jenifer.lopez, isabelgomez87, pa.chruscinski.ext, schibstedspain, alfredo.arronte, belen.santos, xavi_ballestar, ferrangbtw, jamile.radloff, davidmartin2108, sergi.quintela, estefania_garcia, carlosvillu-adevinta, miriam-gil, arnau.guell, ferran.simon, victor.perez.adevinta, mariapaula.forero.ext, oscar.gomez, david.nieto, oriol.puig, nacho_torrella, xavi.murcia, ignacio.rodriguez, francisco.ruiz.lloret, sziauberyte, alfredo.zimperz, andresadv, javiauso, alverd004, marian.lucaci, pablogs, alisa_bayanova, cristhianb, sergiocollado, pablo.rey-adevinta, beatrizip, alex.castells, david.cuadrado.ext, giovanny.sayas.ext, patricio.sartore, azahara, marc.benito, sergio.escano, cristina.rodriguez.duque, pol.valls, frandelacasa-adevinta, carolina.mallo.ext, daniel.perez.ext, hpintos_adevinta, carlos.gonzalezl, albert.peiro, oscar-raig-adevinta, thomas.page.ext, sebastian.badea.adevinta, victoria.pasichnyk.ext, sendami.luque.ext, luz_adv, alfredo.narvaez, ruben-martin, dann41, emiliovz, adria.velardos, arturo.vicente, diegomr, sergi.martinez.adevinta, guillemgc3, frontend-jobs, javiermiguel, atilioscolaroadv, crotundu.adevinta, candymd, florinz, denis_z, anya_ok |

## Links

- npm: https://www.npmjs.com/package/@s-ui/js-compiler
- npm.io page: https://npm.io/package/@s-ui/js-compiler

## Dependencies (7)

- [fs-extra](https://npm.io/package/fs-extra.md) 10.1.0
- [@swc/core](https://npm.io/package/@swc/core.md) 1.3.14
- [commander](https://npm.io/package/commander.md) 8.3.0
- [fast-glob](https://npm.io/package/fast-glob.md) 3.2.12
- [typescript](https://npm.io/package/typescript.md) 5.8.2
- [@swc/helpers](https://npm.io/package/@swc/helpers.md) 0.4.12
- [@s-ui/compiler-config](https://npm.io/package/@s-ui/compiler-config.md) 1

## Recent versions

- 1.30.0 (latest) — 2025-03-27
- 1.28.0-typescript-support.8 (typescript-support) — 2024-05-06
- 1.26.0-typescript.6 (typescript) — 2023-12-20
- 1.25.0-beta.0 (beta) — 2023-06-28
- 1.21.0-modern.0 (modern) — 2023-04-26
- 1.22.0-jest.1 (jest) — 2023-02-08
- 1.29.0 — 2024-05-06
- 1.28.0-typescript-support.7 — 2024-04-29
- 1.28.0-typescript-support.6 — 2024-04-29
- 1.28.0-typescript-support.5 — 2024-02-22
- 1.28.0-typescript-support.4 — 2024-02-21
- 1.28.0-typescript-support.3 — 2024-02-13
- 1.28.0 — 2024-02-07
- 1.28.0-typescript-support.2 — 2024-01-26
- 1.28.0-typescript-support.1 — 2024-01-22
- … 83 more at https://npm.io/package/@s-ui/js-compiler/versions

## README

# @s-ui/js-compiler

> Compile your JavaScript and JSX files to be compatible with the browsers

It provides:

- Unified code transformation.
- Usage of SWC to compile files faster.

## Installation

```sh
$ npm install @s-ui/js-compiler --save-dev
```

## Usage

### Via `package.json` (Recommended)

```json
"scripts": {
  "prepublishOnly": "sui-js-compiler"
}
```

### Via CLI

```sh
$ ./node_modules/.bin/sui-js-compiler
```

### Options

| Option     | Type           | Default | Description                                                               |
| ---------- | -------------- | ------- | ------------------------------------------------------------------------- |
| `--ignore` | string \| glob | -       | Takes all the pattern comma separated and ignore them during compilation. |
| `--modern` | boolean        | -       | Transpile using modern browser targets.                                   |

```sh
$ ./node_modules/.bin/sui-js-compiler --ignore=./src/**/*.test.js
```

```sh
$ ./node_modules/.bin/sui-js-compiler --modern
```

#### Compiling TypeScript files and generating type declarations

This tools lets you compile **TS files** and generate their **type declarations** in your packages out of the box. It will do it if the package itself has a `tsconfig.json` placed in its root folder.

## Requirements

Automatically, `@s-ui/js-compiler` searches for `/src` folder and outputs the compiled files to `/lib`.

## Contributing

Please refer to the [main repo contributing info](https://github.com/SUI-Components/sui/blob/master/CONTRIBUTING.md).

---
_Source: https://npm.io/package/@s-ui/js-compiler · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
