Skip to content

Instantly share code, notes, and snippets.

@ivan-hilckov
Created October 28, 2012 07:15
Show Gist options
  • Select an option

  • Save ivan-hilckov/3967951 to your computer and use it in GitHub Desktop.

Select an option

Save ivan-hilckov/3967951 to your computer and use it in GitHub Desktop.
class App < Sinatra::Base
register Sinatra::AssetPack
assets {
serve '/js', :from => 'app/js' # Optional
serve '/css', :from => 'app/css' # Optional
serve '/img', :from => 'app/img' # Optional
# The second parameter defines where the compressed version will be served.
# (Note: that parameter is optional, AssetPack will figure it out.)
js :lib, '/js/lib.js', [
'/js/vendor/jquery.js',
'/js/vendor/underscore.js'
]
js :script, '/js/script.js', [
'/js/app/*.js',
]
js :modernizr, '/js/modernizr.js', [
'/js/vendor/special/modernizr.js',
]
css :style, '/css/style.css', [
'/css/normalize.css',
'/css/*.css'
]
js_compression :jsmin # Optional
css_compression :sass # Optional
}
end
run App
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment