Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Adds @sourceURL support to Sprockets

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 sprockets-source.gemspec
README.md

Sprockets Source URL

Source URLs are awesome little 'meta comments' that the browser can use for finding the names of scripts. For example:

//@ sourceURL=my/script/name

This means that instead of seeing one compiled file in Chrome's inspector, like this:

Before

You see your whole directory tree:

After

So much easier to navigate! The alternative to this is to spit out multiple script tags into the page.

Usage

Just require sprockets/source_url in development.

@sourceURL

Both Chrome and Firefox have @sourceURL support. For more information, please see this excellent post on the subject.

Something went wrong with that request. Please try again.