Skip to content

Instantly share code, notes, and snippets.

@jacquescrocker
Created December 5, 2010 02:36
Show Gist options
  • Save jacquescrocker/728704 to your computer and use it in GitHub Desktop.
Save jacquescrocker/728704 to your computer and use it in GitHub Desktop.
my barista config
# config/assets.yml
# I include these assets in my layout via jammit's helpers
# include_javascripts :all
# include_stylesheets :all
# learn more about jammit here: http://documentcloud.github.com/jammit/
compress_assets: off
package_path: "assets-compiled"
javascripts:
all:
- public/javascripts/firebugx.js
- public/javascripts/jquery.js
- public/javascripts/jquery-ui.js
- public/javascripts/rails.js
- public/javascripts/underscore.js
- public/javascripts/underscore.strings.js
- public/javascripts/backbone.js
- public/javascripts/jquery.plugins/*.js
# pull in all the compiled javascripts (from barista)
- public/javascripts/compiled/**/*.js
stylesheets:
all:
# pull in all the compiled stylesheets (from compass/sass)
- public/stylesheets/compiled/**/*.css
ie:
- public/stylesheets/ie.css
# config/initializers/barista.rb
# Configure barista.
Barista.configure do |c|
c.root = Rails.root.join("public", "coffee")
c.output_root = Rails.root.join("public", "javascripts", "compiled")
c.compiler = :native
# Disable wrapping in a closure:
# c.no_wrap = true
# ... or ...
# c.no_wrap!
# Change the output root for a framework:
# c.change_output_prefix! 'framework-name', 'output-prefix'
# or for all frameworks...
# c.each_framework do |framework|
# c.change_output_prefix! framework.name, "vendor/#{framework.name}"
# end
# or, prefix the path for the app files:
# c.change_output_prefix! :default, 'my-app-name'
# or, hook into the compilation:
# c.before_compilation { |path| puts "Barista: Compiling #{path}" }
# c.on_compilation { |path| puts "Barista: Successfully compiled #{path}" }
# c.on_compilation_error { |path, output| puts "Barista: Compilation of #{path} failed with:\n#{output}" }
# c.on_compilation_with_warning { |path, output| puts "Barista: Compilation of #{path} had a warning:\n#{output}" }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment