Skip to content

yanbingbing/jsx4express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsx4express

Fork form express-jsx, make a litte change.

Express middleware that transforms jsx to js at request time.

Request the .js file and jsx4express will check for a matching filename with a .jsx extension and transform it to .js.

Installation

npm install jsx4express

Example usage

var express = require('express');
var jsxCompile = require('jsx4express');
...
var app = express();
...
app.use(jsxCompile(path.join(__dirname, 'public')));
app.use(express.static(path.join(__dirname, 'public')));
...
<script type="text/javascript" src="/path/to/.js"></script>

License

MIT -- see the LICENCE file for details

History

  • 0.1.0

use babel to replace react-tool.

About

jsx transformer middleware for express

Resources

License

Stars

Watchers

Forks

Packages

No packages published