简体   繁体   中英

Why use Rake tasks?

I saw this question What is the purpose of Rake? but I still don't get it.

Why can't you just create a Ruby script in a file and run ruby myscript.rb ?

What does using a Rake task let you do that regular ol' Ruby doesn't?

A few reasons. Rake has the following benefits:

  • Users can specify tasks with prerequisites.
  • A library of prepackaged tasks to make building rakefiles easier. For example, tasks for building tarballs and publishing to FTP or SSH sites. (Formerly tasks for building RDoc and Gems were included in rake but they're now available in RDoc and RubyGems respectively.)

  • Supports parallel execution of tasks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM