JavaScript 的 MVP 框架,Riot.js 2.3.11 发布下载

jopen 9年前

Riot.js是一个客户端模型-视图-呈现(MVP)框架并且它非常轻量级甚至小于1kb.尽管他的大小令人难以置信,所有它能构建的有如下:一个模板引擎,路由,甚至是库和一个严格的并具有组织的MVP模式。当模型数据变化时视图也会自动更新。

Riot.js 2.3.11 发布下载,此版本更新内容:

  • Compiler

    • Gets rid of the zero-indentation restriction for custom tags, now you can indent these tags, but the opening and closing tag must have exactly the same indentation (length and type). All the tag will be unindented by this amount.

    • Support for src and charset attributes in <script> tags for reading JavaScript sources from the file system - riot#507

    • The compile function can return separate parts by setting the new entities option. These parts have unescaped newlines.

    • New attribute options for script and style tags will append/overwrite attributes in the default configuration object of the parser at tag level.

    • Fix riot#1261: <pre> tag does not preserve neither \n nor \t. Now whitespace within <pre> tags is always preserved.

    • Fix riot#1358: Empty style in tag (scoped) breaks.

    • Fix riot#1306: Compiler preserves newlines in class objects, causing “Unterminated String Constant” errors.

    • Fix riot#1314: settings.brackets no longer works.

  • riot

    • Fix support for riot.render on the old node versions

    • Fix loop small issues using

    • Fix riot.route will not block not registered links with event.preventDefault

    • Add error event on all the riot.observable instances to catch all the possible errors thrown in the callbacks

  • riot-cli

    • Add better error messages if a parser is not locally installed

    • Add the export option to extract singularly just portions of your tags like css, js or html

    • Add the style option to chose the default preprocessor for your tags style

    • Add built-in css preprocessor support for sass, scss and less

    </ul>

    下载:https://github.com/riot/riot/archive/v2.3.11.zip