0.2.0 • Published 8 years ago

jsx-transform-cli v0.2.0

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

jsx-transform-cli

Build Status

A command line interface for jsx-transform.

Installation

Install it globally with:

$ npm install -g jsx-transform-cli

Or within a project for use as an NPM script:

$ npm install --save-dev jsx-transform-cli

Usage

JSX is read from STDIN. Compiled JS is written to STDOUT.

$ echo '<div>Hello, world!</div>' | jsx-transform
h('div', null, ["Hello, world!"])

Specify a factory function with -f or --factory.

$ echo '<div>Hello, world!</div>' | jsx-transform --factory React.createElement
React.createElement('div', null, ["Hello, world!"])