befe-riotjs-loader
v0.1.3
Published
riotjs module loader for webpack with module separation
Downloads
8
Maintainers
Readme
riotjs truely module loader
Installation
npm install --save-dev befe-riotjs-loader
Notice
- Only one tag is allow on the tag.
- riotmap is required for loading customed tags
usage
# index.js (entry file)
var riot = require('riot')
var tag = require('./my-tag.tag')
riot.mount('#root', tag, {
name: 'world'
})
# my-tag.tag
var riotmap = {
section: require('./section.tag')
}
<my-tag>
<h1 ha={ name } onClick={handleClick}>hello { name }</h1>
<div riot-tag="section"></div>
<script>
this.name = opts.name || 'world';
this.handleClick = function() {
alert('hi')
}
</script>
</my-tag>
# section.tag
<my-section>
<span>My section</span>
</my-section>
Links
- Self link: https://www.npmjs.com/package/befe-riotjs-loader