Skip to content

Add support to filter the assets that should be precompiled #3

Merged
merged 1 commit into from Jun 20, 2012
View
6 lib/catapult/cli.rb
@@ -12,14 +12,14 @@ def self.source_root
File.expand_path('../../..', __FILE__)
end
- desc 'build', 'Build project'
+ desc 'build [asset1 asset2..]', 'Build project'
- def build
+ def build(*assets)
target = Pathname('./public/assets')
say "Building: #{Catapult.root}"
- Catapult.environment.each_logical_path do |logical_path|
+ Catapult.environment.each_logical_path(assets) do |logical_path|
if asset = Catapult.environment.find_asset(logical_path)
filename = target.join(logical_path)
FileUtils.mkpath(filename.dirname)
Something went wrong with that request. Please try again.