Ractive.js - 下一代DOM操作框架

网友投稿 821 2022-10-20

Ractive.js - 下一代DOM操作框架

Ractive.js - 下一代DOM操作框架

Ractive.js - Next-generation DOM manipulation

Got questions? Tag Stack Overflow questions with ractivejs or contact @RactiveJS on Twitter

What is Ractive.js?

It's a JavaScript library for building reactive user interfaces in a way that doesn't force you into a particular framework's way of thinking. Its features include...

data-binding, with a beautiful declarative syntaxevent handling that doesn't make you tear your hair outflexible and performant animations and transitions

...among many others. It takes a radically different approach to DOM manipulation - one that saves both you and the browser unnecessary work.

To get a feel for how it will make your life as a web developer easier, visit ractivejs.org, follow the interactive tutorials, or try the 60 second setup.

Get help

If you don't find what you're looking for in the docs, ask a question in Google Groups forum, Stack Overflow with the ractivejs tag, or send a tweet to @RactiveJS.

Developing and building

If you want to hack on Ractive, the first step is to clone the repo and install all its development dependencies:

git clone https://github.com/ractivejs/ractive # or your forkcd ractivenpm install

While developing the library, you can serve it with gobble:

npm start

Navigate to localhost:4567 - you'll see two folders, plus ractive.js:

sandbox - this contains some template files to help with debugging. Start by copying the sandbox/sample folder and following the instructions thereintest - the test suite (duh)

After the initial build, any subsequent changes will result in fast incremental rebuilds. If you're using Chrome, you can use the LiveReload plugin.

Gobble is still in development - please report any bugs to the issue tracker - thanks!

To run a complete build (including linting, testing and minification):

npm run build

Distribution build requirements

A real shell, so Linux and OS X should be good. Windows needs MSYS or something similar at least on the path.On Windows, if you get an EINVAL when running the tests, you may need to update the phantomjs script in the node_modules/.bin to use { stdio: 'inherit' } when spawning the child process instead of manually piping afterwards.

Contributing

Pull requests and issues are always welcome! Please read CONTRIBUTING.md to learn how to contribute.

Reporting security vulnerabilities

If you think you've found a security vulnerability, please email ractive-js-security@googlegroups.com with details, and someone from the core team will respond to you.

Browser support

Tested successfully in IE8+ and all modern browsers. If your experience differs please let me know! (For legacy browser support, use the builds with legacy in the filename - these include polyfills for Array.prototype.forEach and other ES5 features used by Ractive.)

License

Copyright (c) 2012-15 Rich Harris and contributors. Released under an MIT license.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:请用Python实现一段程序,可以对一个整数k进行拆分,得到所有由1到k的整数相加的形式
下一篇:乱码问题解决
相关文章

 发表评论

暂时没有评论,来抢沙发吧~