# @phoenix-plugin-registry/vjsrinath.reactjs-jsxtransformer

> A tool to automatically compile JSX files to Js

Latest version **0.1.0** (published 2022-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @phoenix-plugin-registry/vjsrinath.reactjs-jsxtransformer
pnpm add @phoenix-plugin-registry/vjsrinath.reactjs-jsxtransformer
yarn add @phoenix-plugin-registry/vjsrinath.reactjs-jsxtransformer
bun add @phoenix-plugin-registry/vjsrinath.reactjs-jsxtransformer
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2022-02-21 |
| First published | 2022-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Srinath Janakiraman |
| Maintainers | ushmajit, core.ai |

## Links

- npm: https://www.npmjs.com/package/@phoenix-plugin-registry/vjsrinath.reactjs-jsxtransformer
- Homepage: https://github.com/techmachine/ReactJsJSXTransformer/
- npm.io page: https://npm.io/package/@phoenix-plugin-registry/vjsrinath.reactjs-jsxtransformer

## Recent versions

- 0.1.0 (latest) — 2022-02-21

## README

ReactJs-JSXTransformer
=====================

An extension for Brackets to manage reactjs components.

**Warning: this extension doesn not provide any extra features other than compiling jsx files to js.**

The html part of jsx files must be placed in seperate html file and relative (to jsx file) path  of the same file should be
kept in the place where the transformed jsx content should come.

The template file path must be enclosed in the following format
```js
/*<transform>{RELATIVE_PATH_TO_HTML_FILE}</transform>*/
```

For example, a jsx file **comp.jsx** like below 

```js
/**
 * @jsx React.DOM
 */
require('react-with-addons', function () {
   return /*<transform>template.html</transform>*/;
}); 
```
with **template.html** content like 

```html
<div>
   <span> 
   </span>
   <div>
   </div>
</div>
```

will be transformed to **comp.js** as shown below

```js
/**
 * @jsx React.DOM
 */
require('react-with-addons', function() {
    return React.DOM.div(null,
        React.DOM.span(null),
        React.DOM.div(null)
    );
});
```

Making brackets to treat jsx file as a js would make managing jsx files lot easier. To do so save the below mention code as
**bracket.json** file

```json
{
    "language.fileExtensions": {
        "jsx": "javascript"
    }
}
```


The transformation is automatically triggered whenever either of the files are changed. (jsx or html)
The transformed files are beatified before saved to disk.

**To compile currrently opened JSX file, press Ctrl-Shift-T or select File -> Compile Component.**

License
----

MIT

---
_Source: https://npm.io/package/@phoenix-plugin-registry/vjsrinath.reactjs-jsxtransformer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
