Module | Sprockets::Trail |
In: |
lib/sprockets/trail.rb
|
`Trail` is an internal mixin whose public methods are exposed on the `Environment` and `Index` classes.
Append a `path` to the `paths` list.
Paths at the beginning of the `Array` have a higher priority.
Returns an `Array` of extensions.
These extensions maybe omitted from logical path searches.
# => [".js", ".css", ".coffee", ".sass", ...]
Returns an `Array` of path `String`s.
These paths will be used for asset logical path lookups.
Note that a copy of the `Array` is returned so mutating will have no affect on the environment. See `append_path`, `prepend_path`, and `clear_paths`.
Prepend a `path` to the `paths` list.
Paths at the end of the `Array` have the least priority.
Finds the expanded real path for a given logical path by searching the environment‘s paths.
resolve("application.js") # => "/path/to/app/javascripts/application.js.coffee"
A `FileNotFound` exception is raised if the file does not exist.
Returns `Environment` root.
All relative paths are expanded with root as its base. To be useful set this to your applications root directory. (`Rails.root`)