# coffee-reactify

> browserify v2 plugin for coffee-react cjsx

Latest version **5.1.0** (published 2016-10-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install coffee-reactify
pnpm add coffee-reactify
yarn add coffee-reactify
bun add coffee-reactify
```

## 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 | 5.1.0 |
| Published | 2016-10-03 |
| First published | 2014-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 105 |
| Maintainers | jsdf |
| Keywords | coffee-script, react, browserify, transform |

## Links

- npm: https://www.npmjs.com/package/coffee-reactify
- Repository: https://github.com/jsdf/coffee-reactify
- Issues: https://github.com/jsdf/coffee-reactify/issues
- npm.io page: https://npm.io/package/coffee-reactify

## Dependencies (3)

- [through](https://npm.io/package/through.md) ~2.3.4
- [coffee-react](https://npm.io/package/coffee-react.md) ^5.0.0
- [convert-source-map](https://npm.io/package/convert-source-map.md) ~0.3.3

## Recent versions

- 5.1.0 (latest) — 2016-10-03
- 0.6.0 (old) — 2014-10-22
- 5.0.0 — 2016-04-17
- 4.0.0 — 2015-06-27
- 3.0.0 — 2015-03-17
- 2.4.1 — 2015-02-09
- 2.1.0 — 2014-12-01
- 2.0.0 — 2014-10-29
- 1.0.3 — 2014-10-06
- 1.0.2 — 2014-09-25
- 1.0.1 — 2014-09-24
- 0.5.2 — 2014-09-09
- 0.5.1 — 2014-08-31
- 0.5.0 — 2014-08-01
- 0.4.0 — 2014-06-30
- … 4 more at https://npm.io/package/coffee-reactify/versions

## README

# coffee-reactify

# STATUS: DEPRECATED

This tool is no longer maintained. If you need to transition your codebase from
it, a codemod is available to do so: [cjsx-codemod](https://github.com/jsdf/cjsx-codemod)

This project started as a way for me to explore how JSX could fit into
Coffeescript syntax, as a quickly hacked together prototype. While I never
really promoted it, it quickly took on a life of its own, and before long people
were asking for it to support all kinds of different use cases. On top of that I
had no experience writing parsers, so the result is something with 
[insurmountable limitations](https://github.com/jsdf/coffee-react/issues/32).

As I eventually stopped using Coffeescript I ended up neglecting this project,
but as people were using it I didn't want to kill it. I really should have,
however, because it meant that people were using a crappy, ill-conceived,
unmaintained tool. Now, long overdue, I'm putting it out to pasture.

Original readme follows:

browserify v2 plugin for compiling [coffee-react-transform](https://github.com/jsdf/coffee-react-transform) CJSX markup in Coffeescript.

# example

given some files written in a mix of `coffee` and `cjsx`:

neat-ui.coffee:
``` coffee
require './rad-component.cjsx'

React.renderComponent RadComponent({rad:"mos def"}),
	document.getElementById('container')
```

rad-component.cjsx:
``` coffee
# @cjsx React.DOM 

React = require('react')

RadComponent = React.createClass
  render: ->
    <div className="rad-component">
      <p>is this component rad? {@props.rad}</p>
    </div>
```

install coffee-reactify:

```bash
$ npm install -g coffee-reactify
```

version compatibility: 

- 2.1.x - React 0.12.1
- 2.x - React 0.12
- 1.x - React 0.11.2
- 0.x - React 0.11 and below

when you compile your app, pass `-t coffee-reactify` to browserify:

```bash
$ browserify -t coffee-reactify neat-ui.coffee > bundle.js
```

you can omit the `.coffee` or `.cjsx` extension from your requires if you add the extension to browserify's module extensions:

``` coffee
require './component'
...
```

```bash
$ browserify -t coffee-reactify --extension=".cjsx" --extension=".coffee" neat-ui.coffee > bundle.js
```

providing the transform option `coffeeout: true` will passthrough the transformed
output of `.coffee` files with the `@cjsx` pragma without compiling them to javascript.
this means you can use a different coffee compiler transform such as [icsify](https://github.com/maxtaco/icsify) or [coffeeify](https://github.com/jnordberg/coffeeify) in conjunction with this transform.

**note:** at this stage, `.cjsx` files will still be compiled even with `--coffeeout`.
this is a workaround for the fact that other transform modules like `coffeeify` will
ignore `.cjsx` files due to the different file extension.

```bash
$ browserify -t [ coffee-reactify --coffeeout ] -t coffeeify neat-ui.coffee > bundle.js
```

# install

With [npm](https://npmjs.org) do:

```bash
npm install coffee-reactify
```

# license

MIT

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