Created
January 28, 2012 21:31
-
-
Save heisters/1695818 to your computer and use it in GitHub Desktop.
Sinatra + Sprockets + Jasmine + Coffeescript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src_files: | |
- assets/javascripts/app.js.coffee | |
- assets/spec.js.coffee | |
# ... | |
stylesheets: | |
- assets/stylesheets/app.css |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requires the jasmine patch at https://github.com/heisters/jasmine-gem/commit/15277ed7885a5d08ab84d2a4a2417e0d22564c07 | |
require 'sprockets' | |
module Jasmine | |
class Config | |
# Add your overrides or custom config code here | |
# This rack builder definition is a stripped-down version of my config.ru | |
def rack_app rack | |
this = self # Rack fuckaz are using instance_eval, so the default receiver is about to change | |
rack.map '/assets' do | |
sprockets = Sprockets::Environment.new this.project_root | |
sprockets.append_path 'assets' | |
sprockets.append_path 'spec/javascripts' | |
run sprockets | |
end | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= require_tree . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment