middleman/middleman-sprockets — pull request #12 by jordanandree (2013-01-30 23:24:13+00:00)
Title: Add assets_load_paths configuration - adds additional path mappings to sprockets environment

This Pull allows for additional asset paths to be passed down to the middleman-sprockets environment. Functionality is similar to [Pull Request #1](https://github.com/middleman/middleman-sprockets/pull/1), but with some extra mapping features.

Simply put, this adds more flexibility with `asset_path` and `asset_url` template and stylesheet helpers. The functionality is initially targeted for use with images, fonts, and other non-preprocessed assets (like coffee or sass).

**Configuration**

Syntax is as follows:
```ruby
set :assets_load_paths, [{"#{root}/path/to/folder" => "mapping"}]
```
(A working example of the configuration can be viewed in [fixtures/assets-load-paths-app/config.rb](https://github.com/jordanandree/middleman-sprockets/blob/05824c1bb2e5cbf8e2dd544fdbb092be7c54b818/fixtures/assets-load-paths-app/config.rb))

**Helpers**

The use case after mapping a new load path, using the configuration above, is as follows:

*HTML*
```html

```

*SCSS*
```scss
.element {
background: asset-url('/mapping/test.jpg');
}
```

Not sure on the naming of the configuration parameter; seems a little ambiguously named as "assets_load_paths". Thoughts?

Cheers