sprockets

https://github.com/rails/sprockets

Ruby

Rack-based asset packaging system

Sprockets::Loader#resolve_dependencies

Internal: Resolve set of dependency URIs.

uris - An Array of "dependencies" for example:
       ["environment-version", "environment-paths", "processors:type=text/css&file_type=text/css",
          "file-digest:///Full/path/app/assets/stylesheets/application.css",
          "processors:type=text/css&file_type=text/css&pipeline=self",
          "file-digest:///Full/path/app/assets/stylesheets"]

Returns back array of things that the given uri depends on
For example the environment version, if you're using a different version of sprockets
then the dependencies should be different, this is used only for generating cache key
for example the "environment-version" may be resolved to "environment-1.0-3.2.0" for
version "3.2.0" of sprockets.

Any paths that are returned are converted to relative paths

Returns array of resolved dependencies

Source | Google | Stack overflow

Edit

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

cd sprockets

open lib/sprockets/loader.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Sprockets--Loader-resolve_dependencies-for-pr


# Commit to git

git add lib/sprockets/loader.rbgit commit -m "better docs for Sprockets::Loader#resolve_dependencies"


# 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--Loader-resolve_dependencies-for-pr

hub pull-request


# Celebrate!