Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

Add the ability to specify a url_to_path table. #27

Merged
merged 5 commits into from Feb 8, 2013

Conversation

shane-tomlinson
Copy link

This allows files to be looked up in the table that may not be in the root path.

This allows files to be looked up that may not be in the root path.
@@ -84,7 +87,7 @@ exports.setup = function (assets, options) {
}
} else {
// Would we ever want to use cachify for non-file resources?
if (existsSync(path.join(opts.root, true_path))) {
if (existsSync(true_path)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup, removing duplicate logic.

Shane Tomlinson added 4 commits February 7, 2013 11:14
* Add a file to the repo, test/test-data/test-file.js which is used as a stable file from which to calculate the md5. This is used to make sure url_to_paths is operating as expected.
@@ -110,6 +117,9 @@ The following are optional config for ``cachify.setup``
* root - Path where static assets are stored on disk. Same value as you'd pass
to the ``static`` middleware.

* url_to_paths - an associative array of URLs to absolute filename paths.
Useful to specify paths to files that are not in the ``root`` directory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect.

ozten added a commit that referenced this pull request Feb 8, 2013
Add the ability to specify a url_to_path table.
@ozten ozten merged commit ae4fbbc into mozilla:master Feb 8, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants