What exactly is Rake?

后端 未结 4 1098
攒了一身酷
攒了一身酷 2021-01-30 08:03

In simple terms, what does Rake do? What purposes does it have? I understand it\'s a build tool but I\'m looking a bit more detail. (For a simpleton.)

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-30 08:44

    These answers assume you know what a DSL is, or are familiar with Make or Ant. If that's not the case, here's a (perhaps grossly oversimplified answer):

    Rake is a tool you can use with Ruby projects. It allows you to use ruby code to define "tasks" that can be run in the command line.

    Rake can be downloaded and included in ruby projects as a ruby gem.

    Once installed, you define tasks in a file named "Rakefile" that you add to your project.

    We call it a "build tool" because Rake comes with some libraries that make it easy to do tasks that are common during the build/deploy process, like file operations (creating, deleting, renaming, & moving files), publishing sites via FTP/SSH, and running tests.

    For more information, here's the project documentation: http://rake.rubyforge.org/

提交回复
热议问题