守望者--AIR技术交流

标题: Riot v3.0.0 发布,JavaScript 的 MVP 框架 [打印本页]

作者: 破晓    时间: 2016-11-28 13:37
标题: Riot v3.0.0 发布,JavaScript 的 MVP 框架
ingFang SC", "Helvetica Neue", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; font-size: 16px;">

Riot v3.0.0 发布了。

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

该版本暂未提供更新内容,您可点击此处了解修复情况

下载地址:

ingFang SC", "Helvetica Neue", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;">
本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处,尊重他人劳动共创开源社区。
转载请注明:文章转载自 开源中国社区 [http://www.oschina.net]
本文标题:Riot v3.0.0 发布,JavaScript 的 MVP 框架
本文地址:https://www.oschina.net/news/79291/riot-v3-0-0


作者: 破晓    时间: 2016-11-28 13:38

Riot logo

Simple and elegant component-based UI library

Build Status Riot Forum Join the chat at <a href=https://gitter.im/riot/riot" data-canonical-src="https://img.shields.io/badge/GITTER-JOIN_CHAT_%E2%86%92-1dce73.svg?style=flat-square" style="box-sizing: content-box; max-width: 100%;">

NPM version NPM downloads MIT License Coverage Status Code Quality

Sauce Test Status

Framework Size Comparison

FrameworkVersionMinified Size (gzip)
Angular22too much
Ember2.9.1110.30kb
Angular1.5.856.28kb
Polymer + Web Components Polyfill Lite1.7.050.25kb
React15.4.045.05kb
Web Components Polyfill0.7.2233.66kb
Vue1.0.2826.83kb
Vue2.1.025.44kb
Riot3.0.19.75kb

Browsers support

Riot is supported by all modern browsers and it does not require any additional polyfill

Custom tags • Concise syntax • Simple API • Tiny Size

Riot brings custom tags to all modern browsers. Think React + Polymer but with enjoyable syntax and a small learning curve.

Tag definition

<timer>

  <p>Seconds Elapsed: { time }</p>

  this.time = opts.start || 0

  tick() {
    this.update({ time: ++this.time })
  }

  var timer = setInterval(this.tick, 1000)

  this.on('unmount', function() {
    clearInterval(timer)
  })

</timer>

Open this example on Plunker

Mounting

riot.mount('timer', { start: 0 })

Nesting

Custom tags lets you build complex views with HTML.

<timetable>
  <timer start="0"></timer>
  <timer start="10"></timer>
  <timer start="20"></timer>
</timetable>

HTML syntax is the de facto language on the web and it's designed for building user interfaces. The syntax is explicit, nesting is inherent to the language and attributes offer a clean way to provide options for custom tags.

Expressions Bindings

Close to standards

Use your dearest language and tools

CDN hosting

Concise syntax

Demos

Tutorials

Video Tutorials

Libraries / Frameworks

Components

Resources

Performance

Miscellaneous

Editors / Editor Plugins (Syntax highlighting, autcompletion, etc...)

How to contribute

If you are reading this it's already a good sign and we are thankful for it! We try our best working as much as we could on riot but your help is always appreciated.

If you want to contribute to riot helping us maintaining the project please check first the list of our open issues to understand whether there is a task where you could help.

Riot is mainly developed on UNIX systems so you will be able to run all the commands necessary to build and test the library using our Makefile. If you are on a Microsoft machine it could be harder to set up you development environment properly.

Following the steps below you should be able to properly submit your patch to the project

1) Clone the repo and browse to the riot folder

$ git clone git@github.com:riot/riot.git && cd riot

2) Set up your git branch

$ git checkout -b feature/my-awesome-patch

3) Install the npm dependencies

$ npm i

4) Build and test riot using the Makefile

# To build and test riot
$ make riot

# To build without testing
$ make raw

# To build anytime you change a src file
$ make watch

# To bench riot ( it requires ctrl+c to exit )
$ make perf

5) Pull request only against the dev branch making sure you have read our pull request template

6) Be patient

Credits

Riot is made with :heart: by many smart people from all over the world. Thanks to all the contributors
It's actively maintained by:

Buy us a coffee :coffee:

Click here to lend your support to: Riot and make a donation at pledgie.com !

http://riotjs.com/






欢迎光临 守望者--AIR技术交流 (http://www.airmyth.com/)