Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wildlyinaccurate/jsx-transform-cli
A command line interface for jsx-transform
https://github.com/wildlyinaccurate/jsx-transform-cli
Last synced: 5 days ago
JSON representation
A command line interface for jsx-transform
- Host: GitHub
- URL: https://github.com/wildlyinaccurate/jsx-transform-cli
- Owner: wildlyinaccurate
- License: isc
- Created: 2016-05-16T19:55:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-06-06T13:28:27.000Z (over 8 years ago)
- Last Synced: 2023-12-23T12:05:25.200Z (11 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jsx-transform-cli
[![Build Status](https://travis-ci.org/wildlyinaccurate/jsx-transform-cli.svg?branch=master)](https://travis-ci.org/wildlyinaccurate/jsx-transform-cli)
A command line interface for [jsx-transform](https://github.com/alexmingoia/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 'Hello, world!' | jsx-transform
h('div', null, ["Hello, world!"])
```Specify a factory function with `-f` or `--factory`.
```
$ echo 'Hello, world!' | jsx-transform --factory React.createElement
React.createElement('div', null, ["Hello, world!"])
```