README.md in sprockets-helpers-0.2.1 vs README.md in sprockets-helpers-0.3.0

- old
+ new

@@ -22,11 +22,11 @@ Setup ----- -Let's build a simple Sinatra app using Sprockets and Sprockets::Helpers (See [sinatra-asset-pipeline](https://github.com/stevehodgkiss/sinatra-asset-pipeline) for complete setup): +Let's build a simple Sinatra app using Sprockets and Sprockets::Helpers (See my fork of [sinatra-asset-pipeline](https://github.com/petebrowne/sinatra-asset-pipeline) for complete setup): ``` ruby require "sinatra/base" require "sprockets" require "sprockets-helpers" @@ -71,12 +71,12 @@ Usage in Assets --------------- Simply requiring sprockets-helpers will add the asset path helpers to the Sprocket context, making them available within any asset. For example, a file `assets/javascripts/paths.js.erb`: -``` erb -var Paths = { railsImage: "<%= image_path "rails.png %>" }; +``` js+erb +var Paths = { railsImage: "<%= image_path "rails.png" %>" }; ``` Would be transformed into: ``` javascript @@ -89,11 +89,11 @@ The helpers can also be used in the app itself. You just include the `Sprockets::Helpers` module and set Sprockets::Helpers.environment to the Sprockets environment to search for the assets. Alternatively you can define an #assets_environment method in the context of #asset_path, which returns a reference to the Sprockets environment (see above). Now the following index file: -``` erb +``` html+erb <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Sinatra with Sprockets 2 (Asset Pipeline)</title> @@ -129,10 +129,10 @@ If the source is not an asset in the Sprockets environment, Sprockets::Helpers will fallback to looking for the file in the application's public directory. It will also append the cache busting timestamp of the file. For example: Given an image, `public/images/logo.jpg`: -``` erb +``` html+erb <img src="<%= image_path "logo.jpg" %>"> ``` Would become: