Skip to content
Browse files

Cleanup the README

  • Loading branch information...
1 parent 8d4e98a commit 41a143a28044f48edcacbb40db054945d1bba832 @peteog committed Feb 24, 2012
Showing with 41 additions and 4 deletions.
  1. +41 −4 README.md
View
45 README.md
@@ -3,11 +3,33 @@
* Concatinates and minifies JavaScript and CSS
* Provides view helpers
-[See examples folder for sample apps](https://github.com/peteog/sinatra-simple-assets/tree/master/examples)
+[See examples directory for sample apps](https://github.com/peteog/sinatra-simple-assets/tree/master/examples)
-## View helper output
+## Usage
-### CSS
+### In the app
+
+ assets do
+ css :application, [
+ '/stylesheets/bootstrap.css',
+ '/stylesheets/application.css'
+ ]
+ js :application, [
+ '/javascripts/bootstrap-modal.js',
+ '/javascripts/bootstrap-dropdown.js',
+ '/javascripts/bootstrap-scrollspy.js',
+ '/javascripts/bootstrap-buttons.js',
+ '/javascripts/bootstrap-tabs.js',
+ '/javascripts/bootstrap-twipsy.js',
+ '/javascripts/bootstrap-popover.js',
+ '/javascripts/bootstrap-alerts.js',
+ '/javascripts/application.js'
+ ]
+ end
+
+### In the views
+
+#### CSS
<%= stylesheet :application %>
@@ -20,7 +42,7 @@ production:
<link rel="stylesheet" href="http://localhost:9292/stylesheets/application-1d512aa30517f9c05c6fc81258c586caeafc1136.css">
-### JavaScript
+#### JavaScript
<%= javascript :application %>
@@ -39,3 +61,18 @@ development:
production:
<script src="http://localhost:9292/javascripts/application-2e4cd283a08121a850c0117a1ca64648e34cce98.js"></script>
+
+## Precompiling
+
+ # Rakefile
+ require "#{File.dirname(__FILE__)}/app"
+
+ namespace :assets do
+ desc 'Precompile assets'
+ task :precompile do
+ App.assets.precompile
+ # Sinatra::Application.assets.precompile # classic apps
+ end
+ end
+
+[See examples directory for sample apps](https://github.com/peteog/sinatra-simple-assets/tree/master/examples)

0 comments on commit 41a143a

Please sign in to comment.
Something went wrong with that request. Please try again.