Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

2 participants

@lucasmazza
Collaborator

Most of the times you would just precompile a single js or css file, instead of the entire project.

[]'s

@maccman
Owner

Yes, this is a tricky one. So your change means you can run: build app/assets/application.js ?

@lucasmazza
Collaborator

No, just build application.js application.css

@maccman maccman merged commit d718d5e into maccman:master
@maccman
Owner

Cool. I've added you as a contributor on the repo, but let's still do changes as a pull request. Thanks so much!

@lucasmazza
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 20, 2012
  1. @lucasmazza
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/catapult/cli.rb
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.