Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Commit

Permalink
doc(README): add assetsDirs explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanebachelier committed Feb 22, 2015
1 parent 4d1593a commit e65885c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Expand Up @@ -358,7 +358,7 @@ By default `usemin` will look under `dist/html` for revved versions of `styles/m
Type: 'Array'
Default: Single item array set to the value of the directory where the currently looked at file is.

List of directories where we should start to look for revved version of the assets referenced in the currently looked at file.
List of directories where we should start to look for *revved version* of the assets referenced in the currently looked at file.

Example:
```js
Expand All @@ -370,6 +370,13 @@ usemin: {
}
```

Suppose in `index.html` you have a reference to `/images/foo.png`, `usemin` will search for the revved version of `/images/foo.png`, say `/images/foo.12345678.png` in any directories in `assetsDirs` options.

In others words, given the configuration above, `usemin` will search for the existence of one of these files:
* foo/bar/images/foo.12345678.png
* bar/images/foo.12345678.png


#### patterns

Type: 'Object'
Expand Down Expand Up @@ -400,7 +407,7 @@ So in short:
* First one if the regexp to use. The first group is the one that is supposed to represent the file
reference to replace
* Second one is a logging string
* A function which behaves like a filter-in. Receives the matched group and must return the file
* A function which behaves like a filter-in. Receives the matched group and must return the file
path of the asset. Great functionality when you have a compiled file by a template engine.
* A function which behaves like a filter-out. It receives the revved path of the asset and must
return it as an url from it will be reached from web server.
Expand Down

0 comments on commit e65885c

Please sign in to comment.