[ci skip] Fix doc usage of :source_path #301

Merged
merged 1 commit into from May 24, 2016

Projects

None yet

2 participants

@schneems
Member

A follow up from ai/autoprefixer-rails#89 we were accidentally recommending to use the wrong API when building your own processor.

I also added docs for all the different keys that we pass to processors for future reference.

@maclover7 maclover7 and 1 other commented on an outdated diff May 13, 2016
guides/extending_sprockets.md
+Example:
+
+```
+# See metadata section for more info
+{
+ dependencies: [].to_set
+ map: [
+ # ...
+ ]
+}
+```
+
+- `:cache` - [Sprockets::Cache] A cache object you can use to store and retrieve intermediate objects. You can use `Cache#get`, `Cache#set` and `Cache#fetch` api. Refer to method docs for more info. If using paths for the key or contents, use `Sprockets::Environment#compress_from_root` and `Sprockets::Environment#expand_from_root` as the location of of your files absolute path will change.
+
+
+- `:environment` [Sprockets::Environment] Now you have direct access to all 105 methods that sprockets uses! Use carefully, we may consider limiting this in the future. If you have feedback on what methods you need or use please say hi, Open an issue and let the Sprockets team know.
@maclover7
maclover7 May 13, 2016 Member

sprockets --> Sprockets

@schneems
schneems May 14, 2016 Member

Fixed, thanks for the eyes.

@schneems schneems [ci skip] Fix doc usage of :source_path
A follow up from ai/autoprefixer-rails#89 we were accidentally recommending to use the wrong API when building your own processor. 

I also added docs for all the different keys that we pass to processors for future reference.
6e3f905
@schneems schneems merged commit 697cc28 into master May 24, 2016
@schneems schneems referenced this pull request May 24, 2016
Closed

WIP Deprecate hash key #292

@jeremy jeremy deleted the schneems/update-extending-docs-hash branch Nov 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment