Created
March 14, 2012 05:06
-
-
Save zh/2034223 to your computer and use it in GitHub Desktop.
Sprockets without Rails
This file contains 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
ROOT | |
assets/ | |
javascripts/ | |
application.js | |
biz.js.coffee | |
bar.js.coffee | |
stylesheets/ | |
application.css | |
baz.css.scss | |
foo.css.scss | |
config.ru |
This file contains 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
## stuffs | |
Assets = Sprockets::Environment.new(File.dirname(__FILE__)) | |
Assets.paths << "assets/javascripts" | |
Assets.paths << "assets/stylesheets" | |
Routes = Rack::Mount::RouteSet.new do |set| | |
set.add_route Assets, :path_info => %r{^/assets} | |
end | |
run Routes | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment