Asset minification and bundling for Sinatra
JavaScript Ruby
Switch branches/tags
Pull request Compare This branch is 3 commits ahead, 4 commits behind peteog:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
lib/sinatra
.gitignore
Gemfile
README.md
Rakefile
sinatra-simple-assets.gemspec

README.md

Sinatra Simple Assets

  • Concatinates and minifies JavaScript and CSS
  • Provides view helpers

See examples folder for sample apps

View helper output

CSS

<%= stylesheet :application %>

development:

<link rel="stylesheet" href="http://localhost:9292/stylesheets/bootstrap.css">
<link rel="stylesheet" href="http://localhost:9292/stylesheets/application.css">

production:

<link rel="stylesheet" href="http://localhost:9292/stylesheets/application-1d512aa30517f9c05c6fc81258c586caeafc1136.css">

JavaScript

<%= javascript :application %>

development:

<script src="http://localhost:9292/javascripts/bootstrap-modal.js"></script>
<script src="http://localhost:9292/javascripts/bootstrap-dropdown.js"></script>
<script src="http://localhost:9292/javascripts/bootstrap-scrollspy.js"></script>
<script src="http://localhost:9292/javascripts/bootstrap-buttons.js"></script>
<script src="http://localhost:9292/javascripts/bootstrap-tabs.js"></script>
<script src="http://localhost:9292/javascripts/bootstrap-twipsy.js"></script>
<script src="http://localhost:9292/javascripts/bootstrap-popover.js"></script>
<script src="http://localhost:9292/javascripts/bootstrap-alerts.js"></script>
<script src="http://localhost:9292/javascripts/application.js"></script>

production:

<script src="http://localhost:9292/javascripts/application-2e4cd283a08121a850c0117a1ca64648e34cce98.js"></script>