2 Star 0 Fork 0

react-component/gulp-jsx2example

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

gulp-jsx2example

npm version npm download

Compile JSX file to HTML (REPL)

Usage

return gulp
  .src(sourceFiles)
  .pipe(jsx2example(options[, updateWebapckConfig(config):Object]));

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(),
  externalReact: false,     // when `true` don't bundle *react* *react-dom* library, 
                            // speed up webpack compiler time
  production: false         
}

If production true, Will replace gulp entry files content match :

  • new RegExp('(["\']' + pkg.name + ')\/src\/', 'g') => $1 + '/lib/'
  • new RegExp('(["\']' + pkg.name + ')\/assets\/([^.\'"]+).less', 'g') => $1 + '/assets/' + $2 + '.css'

pkg is equal to the options.package

Example

You can reference this repository gulpfile.js

The examples floder published to http://react-component.github.io/gulp-jsx2example/

var jsx2example = require('gulp-jsx2example')

gulp.task('examples', ['clean:site'], function(){
  return gulp
    .src(['./examples/*.*'])
    .pipe(jsx2example()) // jsx2example(options)
    .pipe(gulp.dest('site/examples/'))
})
./
examples
├── es6module.jsx
├── jsfile.js
└── jsxfile.jsx

after

./
site
├── examples
│   ├── common.css
│   ├── common.js
│   ├── es6module.html
│   ├── index.html
│   ├── jsfile.html
│   └── jsxfile.html
└── index.html
examples
├── es6module.jsx
├── jsfile.js
└── jsxfile.jsx

Publish

gh-pages -d site

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

空文件

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_react-component/gulp-jsx2example.git
git@gitee.com:mirrors_react-component/gulp-jsx2example.git
mirrors_react-component
gulp-jsx2example
gulp-jsx2example
master

搜索帮助