【发布时间】:2014-05-31 06:56:54
【问题描述】:
我正在处理以下 rake 文件:
namespace :build do
desc 'Build development application to the build dist directory'
task :default do
Rake::Task[:delete].invoke
end
task :development do
verbose(false) do
puts "=> Building the frontend test build version of application!"
end
end
desc 'Build production application to the build dist directory minified with no tests'
task :production do
verbose(false) do
puts "=> Building the frontend production version of application!"
end
end
end
它有 2 个简单的任务。是的,我在开发过程中把它们拿出来了?我想要实现的是每次调用子 :development 或 :production 任务时都运行 Rake::Task[:delete].invoke 。
另外,我也对设置 :all 不感兴趣。
感谢您的帮助:)
【问题讨论】:
标签: ruby-on-rails rake rake-task rakefile