# just-jsx

> A simple web package that allows you to compile JSX on the go.

Latest version **6.1.2** (published 2023-02-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install just-jsx
pnpm add just-jsx
yarn add just-jsx
bun add just-jsx
```

Provides the command `jsxc`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.1.2 |
| Published | 2023-02-07 |
| First published | 2022-03-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ephf |
| Maintainers | ephf |
| Keywords | jsx, dom, client, compile |

## Links

- npm: https://www.npmjs.com/package/just-jsx
- Repository: https://github.com/ephf/just-jsx
- Homepage: https://github.com/ephf/just-jsx#readme
- Issues: https://github.com/ephf/just-jsx/issues
- npm.io page: https://npm.io/package/just-jsx

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 6.1.2 (latest) — 2023-02-07
- 1.3.0-beta.3 (beta) — 2022-03-12
- 6.1.1 — 2023-01-04
- 6.1.0 — 2022-12-30
- 6.0.0 — 2022-12-29
- 5.2.1 — 2022-12-24
- 5.2.0 — 2022-12-23
- 5.1.1 — 2022-12-22
- 5.1.0 — 2022-12-21
- 5.0.0 — 2022-12-20
- 4.2.0 — 2022-09-02
- 4.1.1 — 2022-08-19
- 4.1.0 — 2022-08-19
- 4.0.4 — 2022-08-17
- 4.0.3 — 2022-08-17
- … 18 more at https://npm.io/package/just-jsx/versions

## README

<img src="jsx.png" width=100 align=right>

# Just JSX

![](https://img.shields.io/npm/dt/just-jsx?style=for-the-badge) ![](https://img.shields.io/github/issues/ephf/just-jsx?style=for-the-badge) ![](https://img.shields.io/npm/l/just-jsx?style=for-the-badge) ![](https://img.shields.io/npm/v/just-jsx?style=for-the-badge)

> compile JSX on the go.

## Import

```html
<script src="https://unpkg.com/just-jsx"></script>
```

## Use

Create a `<script>` tag and add an empty `jsx` attribute to it and it will compile automatically.

```html
<script jsx>
  document.body.append(
    <h1>Hello World</h1>
  )
</script>
```

### Compiler

The compiler is optional, you can use it by installing the package globally.

```bash
npm install just-jsx -g
```

The compiler will compile `.js` `.jsx` `.ts` and `.tsx` files as-is and will replace script tags with the `jsx` attribute in `.html` files with compiled code

Run the command `jsxc` to compile a directory or a file into `out/`

```bash
jsxc [filename/dirname] [-o outputDirname:out]
```

compile a single file

```bash
jsxc file.js
```

compile all files in a directory

```bash
jsxc src
```

specify a custom output directory

```bash
jsxc src -o build
```

---
_Source: https://npm.io/package/just-jsx · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
