关于Rails5.1有什么新东西?

http://nithinbekal.com/posts/rails-5.1-features/

我在想,我们这次是不是跑在了Rails的前面?要不要等等它?

Yarn is part of the default stack

In my previous post, I wrote about using yarn with Rails. With Rails 5.1, you no longer have to do anything - it will be supported out of the box. Yarn is the equivalent of Bundler for JS libraries, and this will make it a lot easier to manage those dependencies.

Webpack option

Rails’ official webpacker gem now makes it easy to integrate webpack with Rails apps. Rails has a --webpack
option to add this gem to Gemfile, and set up the project to work with Webpack.

Easily add React, Angular or Vue.js

With the introduction of webpacker, you also have to option of easily setting up React, Angular or Vue.js as part of our Rails project. Webpacker takes care installing the dependencies, and creating the configuration files.
# For new projects
rails new foobar --webpack=react

# in existing projects
rails webpacker:install:react
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容