befe-riotjs-loader

v0.1.3
riotjs module loader for webpack with module separation
webpack loader riot riotjs module

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

npm i befe-riotjs-loader

Metadata

  • MIT
  • Whatever
  • Eduardo Nunes
  • released 5/18/2016

Downloads

Maintainers