0.7.0 • Published 10 years ago

connect-jsx v0.7.0

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

connect-jsx Build Status: Linux

Middleware to convert react jsx files to javascript on the fly.

Overview

In response to an HTTP GET for a file ending in .js, the module looks for a corresponding file with a .jsx extension, and if found, compiles it into the javascript equivalent.

This is useful with require.js or similar front-end javascript loaders as an alternative to having to do the jsx compilation in the browser.

Uses react-tools to do the actual transformation and send to do the heavy lifting of the actual static file serving.

Installation

npm install --save connect-jsx

Usage

Similar usage to connect.static:

var jsx = require('connect-jsx');
var connect = require('connect');

var root = __dirname; // base directory with .jsx files
var app = connect();
app.use(jsx(root));
0.7.0

10 years ago

0.6.0

10 years ago

0.5.1

10 years ago

0.5.0

10 years ago

0.4.1

11 years ago

0.4.0

11 years ago

0.3.0

11 years ago

0.2.0

11 years ago

0.1.0

11 years ago