jsx-transform-cli

0.2.0 • Public • Published

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!"])

Package Sidebar

Install

npm i jsx-transform-cli

Weekly Downloads

1

Version

0.2.0

License

ISC

Last publish

Collaborators

  • wildlyinaccurate