Useful mixin pack for Riot.js
npm install riot-mixin-pack[![Build Status][travis-image]][travis-url]
[![NPM version][npm-version-image]][npm-url]
[![NPM downloads][npm-downloads-image]][npm-url]
[![MIT License][license-image]][license-url]
This is a series of mixins which make Riot.js more convenient.
``bash`
$ npm install --save-dev riot-mixin-pack
`js`
import { domEvent } from 'riot-mixin-pack'
Or, respectively:
`js`
import domEvent from 'riot-mixin-pack/dom-event'
For ES5:
`js`
var domEvent = require('riot-mixin-pack').domEvent
Then, apply the mixin to the tag: this.mixin(domEvent)
See more detail for each mixin:
- domEvent
- syncEvent
- parentScope
- querySelector
Each directory has these files:
- index.js: source code of mixinREADME
- : description about itspec.js
- : test scriptspec.tag
- : tag(s) for testing
Some note:
- index.js should be written in ES6.spec.js
- and spec.tag should be written in ES5.spec.tag
- In , all tags has the prefix. For example:
[travis-image]:https://img.shields.io/travis/cognitom/riot-mixin-pack.svg?style=flat-square
[travis-url]:https://travis-ci.org/cognitom/riot-mixin-pack
[license-image]:http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square
[license-url]:LICENSE.txt
[npm-version-image]:http://img.shields.io/npm/v/riot-mixin-pack.svg?style=flat-square
[npm-downloads-image]:http://img.shields.io/npm/dm/riot-mixin-pack.svg?style=flat-square
[npm-url]:https://npmjs.org/package/riot-mixin-pack