node package manager

jsxx

jsxx

JSX eXperimental. It adds few features to JSX language used in React.

Namespaces supports

So <module:component /> compiles to module.component(null).

<template> element

jsxx handles <template> element by compiling it to a function which accepts two arguments and returns an array of element children. So the following snippet:

<template>
  Hello, {name}
</template>

is compiled into

function(props, state) {
  return ['Hello, ', name]
}

Installation and usage

Install from npm:

% npm install jsxx

Use from command line:

% jsxx ./main.jsx > main.js

or with browserify:

% browserify -t jsxx/transform ./index.js > ./bundle.js