sprockets

https://github.com/rails/sprockets

Ruby

Rack-based asset packaging system

Sprockets::Resolve#resolve_logical_path

Internal: Finds a file in a set of given paths

paths        - Array of Strings.
logical_path - String. A filename with extension
               e.g. "coffee/foo.js" or "foo.js"
accept       - String. A Quality value incoded set of
               mime types that we are looking for. Can be nil.
               e.g. "application/javascript" or "text/css, */*"

Finds a file on the given paths.

Returns Array. Filename, type, path_pipeline, deps, index_alias

Source | Google | Stack overflow

Edit

git clone [email protected]:rails/sprockets.git

cd sprockets

open lib/sprockets/resolve.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Sprockets--Resolve-resolve_logical_path-for-pr


# Commit to git

git add lib/sprockets/resolve.rbgit commit -m "better docs for Sprockets::Resolve#resolve_logical_path"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Sprockets--Resolve-resolve_logical_path-for-pr

hub pull-request


# Celebrate!