# gulp-jsx2example

> convert jsx file to html (react demo)

Latest version **1.2.4** (published 2017-05-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-jsx2example
pnpm add gulp-jsx2example
yarn add gulp-jsx2example
bun add gulp-jsx2example
```

## 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 | 1.2.4 |
| Published | 2017-05-22 |
| First published | 2015-07-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 (+6 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 14 |
| Author | noyobo |
| Maintainers | noyobo, yiminghe |
| Keywords | react, jsx, react-component, jsx2example, gulp, gulp-jsx2example |

## Links

- npm: https://www.npmjs.com/package/gulp-jsx2example
- Repository: https://github.com/react-component/gulp-jsx2example
- Homepage: https://github.com/react-component/gulp-jsx2example#readme
- Issues: https://github.com/react-component/gulp-jsx2example/issues
- npm.io page: https://npm.io/package/gulp-jsx2example

## Dependencies (7)

- [xtpl](https://npm.io/package/xtpl.md) 3.x
- [marked](https://npm.io/package/marked.md) ~0.3.3
- [through2](https://npm.io/package/through2.md) ~2.0.0
- [gulp-util](https://npm.io/package/gulp-util.md) ~3.0.6
- [xtemplate](https://npm.io/package/xtemplate.md) 4.x
- [highlight.js](https://npm.io/package/highlight.js.md) 8.x
- [lodash.merge](https://npm.io/package/lodash.merge.md) ~3.3.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.4 (latest) — 2017-05-22
- 2.0.0-2 (beta) — 2016-06-05
- 2.0.0 — 2016-12-19
- 2.0.1-0 — 2016-12-17
- 1.2.3 — 2016-09-14
- 1.2.2 — 2016-09-12
- 1.2.1 — 2016-09-12
- 1.2.0 — 2016-06-07
- 1.1.1 — 2016-06-07
- 2.0.0-1 — 2016-06-05
- 2.0.0-0 — 2016-06-05
- 1.1.0 — 2016-03-22
- 1.0.13 — 2016-03-03
- 1.0.12 — 2016-02-18
- 1.0.11 — 2015-11-25
- … 11 more at https://npm.io/package/gulp-jsx2example/versions

## README

gulp-jsx2example
================

[![npm version](http://img.shields.io/npm/v/gulp-jsx2example.svg)](https://www.npmjs.org/package/gulp-jsx2example)
[![npm download](http://img.shields.io/npm/dm/gulp-jsx2example.svg)](https://www.npmjs.org/package/gulp-jsx2example)

Compile JSX file to HTML (react demo)

## Usage

```js
return gulp
  .src(sourceFiles)
  .pipe(jsx2example(options));
```

## Options

```
{
  readme: 'README.md',      // readme file name, content will be render to index.html
  package: 'package.json',  // package file name, access repository information 
  cwd: process.cwd()
}
```

## Example
You can reference this repository `gulpfile.js`

The `examples` floder published to [http://noyobo.com/gulp-jsx2example/](http://noyobo.com/gulp-jsx2example/)

```js
var jsx2example = require('gulp-jsx2example')

gulp.task('examples', ['clean:site'], function(){
  return gulp
    .src(['./examples/*.*'])
    .pipe(jsx2example()) // jsx2example(options)
    .pipe(gulp.dest('site/examples/'))
})

var webpack = require('gulp-webpack')
gulp.task('webpack', ['clean:build'], function() {
  return gulp
    .src(['./examples/*.*'])
    .pipe(webpack())
    .pipe(gulp.dest('site/examples/'))
```


```
./
├── README.md
└── examples
    ├── jsfile.js
    └── jsxfile.js
```

**after**

```
./
├── README.md
├── site
│   ├── examples
│   │   ├── common.js
│   │   ├── common.js.map
│   │   ├── jsfile.html
│   │   ├── jsfile.js
│   │   ├── jsfile.js.map
│   │   ├── jsxfile.html
│   │   ├── jsxfile.js
│   │   └── jsxfile.js.map
│   └── index.html
└── examples
    ├── jsfile.js
    └── jsxfile.js

```

## Publish

```bash
gh-pages -d site
```

> https://www.npmjs.com/package/gh-pages

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