Rake文件的语法格式

以下是Rakefile的基本格式:

namespace :some_namespace do
  # multiple namespaces' wrap
  namespace :more_namespace do
    desc "Describe the task"
    task :some_task do
      # do the task
    end
  end
end

执行这个Rake任务的时候可以这样:

rake some_namespace:more_namespace:some_task
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License