koa-jsx

2.0.7 • Public • Published

koa-jsx

koa middleware for transforming jsx of react

usage

var koa = require('koa');
var jsx= require('koa-jsx');
app.use(jsx(__dirname,{
  reactTools: require('react-tools')
}));

api

jsx

middleware for koa

GeneratorFunction jsx(dir:String, option: Object)
name type description
dir String load js file at path (dir + url), if this file's first line contains /** @jsx React.DOM */, then transform its content into normal javascript and output to browser.
option Object option config
option.reactTools Object require('react-tools') module exports

Readme

Keywords

Package Sidebar

Install

npm i koa-jsx

Weekly Downloads

71

Version

2.0.7

License

MIT

Last publish

Collaborators

  • yiminghe