暴动
“ riotify”是用于“ .riot”文件的浏览器转换器。
重要的
如果您使用Riot.js <4.0.0,请检查
安装
$ npm install riotify @riotjs/compiler -D
用法
该模块旨在与或一起使用:
下面的两个命令中的任何一个都会创建相同的结果:
$ browserify -t riotify app.js
$ module-deps -t riotify app.js | browser-pack
示例app.js :
const Todo = require ( './todo.riot' ) . default
const { component } = require ( 'riot' )
component ( Todo ) ( document . getElementById ( 'todo' ) )
示例todo.
评论0
最新资源