v5.0.0
- Replace jsdom in favor of a lightweight DOM library basichtml
- Improve rendering performance. The rendering is ~5 Times faster
- Add full html rendering #10. Riot.js can now be used as Javascript Server Side template engine. Check the example below:
My-App.riot
<html>
<head>
<title>{ state.message }</title>
<meta each={ meta in state.meta } {...meta}/>
</head>
<body>
<p>{ state.message }</p>
<script src='path/to/a/script.js'></script>
</body>
<script>
export default {
state: {
message: 'hello',
meta: [{
name: 'description',
content: 'a description'
}]
}
}
</script>
</html>index.js
import MyApp from './my-application.riot'
import render from '@riotjs/ssr'
const html = render('html', MyApp)