Neon.js
Virtual DOM based Widget forRequirements
NeoWidget uses JSX to define DOM Trees, so you will need jsx-transform-loader for webpack, jsxtransformify for Browserify or something based on jsx-transform to preprocess JSX.
Setup:
npm install -save neowidget
Webpack Example
webpack.config.js
... loader: 'jsx-transform-loader'
Browserify Example
npm install -save jsxtransformify
browserify -t jsxtransformify file.js -o output.js
Usage Example
You need to specify the @docblock in the files where you use JSX: /** @jsx NeoWidget.h */
/** @jsx NeoWidget.h */ var Heading = data : title : 'Heading Title' { return <div> <h2>thisdatatitle</h2> </div> }; prototype : data : title : 'Click Me!' count : 0 { return <div> new <Heading />virtualNode <button onclick=thisclickHandler>thisdatatitle</button> <p>'Clicks: ' + thisdatacount</p> </div> } { thisdatacount++ this; } ; var widget = widget;