The current version of mercury-jsx is based on version 0.10.0 of React's JSX Transformer.
Put the following jsx pragma at the beginning of files you want to process:
/** @jsx h */
Only output has been tweaked, but there's no special treatment for custom tag
names - the transformer will output a warning if it sees an unknown tag name
and output an
h() call anyway.
Other than that, the rest of React's JSX documentation should still apply:
npm install -g mercury-jsx
mercury-jsx --watch src/ build/
mercury-jsx --help for more information.
npm install mercury-jsx
var msx =
calls using Mercury's
h() function, returning the transformed source.
An example gulpfile.js is
provided, which implements an
msxTransform() function using
Apache 2.0 Licensed, as per React