Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Holland committed Jun 4, 2014
1 parent a2e47d4 commit 9a08456
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,14 @@ Type : `Object`
Default value:
```js
{
'script' : function() { return this.attribs('src'); },
'link[rel="stylesheet"]' : function() { return this.attribs('href'); },
'img' : function() { return this.attribs('src'); },
'link[rel="icon"], link[rel="shortcut icon"]' : function() { return this.attribs('href'); }
'script' : function() { return this.attribs['src']; },
'link[rel="stylesheet"]' : function() { return this.attribs['href']; },
'img' : function() { return this.attribs['src']; },
'link[rel="icon"], link[rel="shortcut icon"]' : function() { return this.attribs['href']; }
}
```

When set, `filters` will be merged with the default (above). These filters are 'selector' : `Function` mapper | `Function` mapper[].
Where the mapper function or array of functions returns the `String` file paths.
The key in the object is the `selector`, and the value provided is the filter. Filters will be merged with the defaults above.

The encoding of the file contents.

Expand Down Expand Up @@ -167,8 +166,8 @@ grunt.initConfig({
dir: '.tmp/public/',
filters: {
'script' : [
function() { return this.attribs('data-main'); } // for requirejs mains.js
function() { return this.attribs('src'); }, // keep default 'src' mapper
function() { return this.attribs['data-main']; } // for requirejs mains.js
function() { return this.attribs['src']; }, // keep default 'src' mapper
]
}
},
Expand Down

0 comments on commit 9a08456

Please sign in to comment.