0.2.0 • Published 10 years ago

sweet-jsx v0.2.0

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

sweet-jsx

Use JSX and Sweet.js macros together.

WARNING: it can be used only with locally installed Sweet.js compiler or with sweetify.

This macros fences JSX syntax inside jsx-tagged template string and compiles it down to JS with respect to hygiene. So you can write JSX like that:

render: function() {
  var x = 42;
  return jsx `<div>The answer is {x}</div>`;
}

It even allows to use other macros inside interpolations:

macro plusone {
  rule { $x:expr } => { $x + 1 }
}

var dom = jsx `
  <div>{plusone 41}</div>
`
0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago