Skip to content

Commit

Permalink
Add options parameter example
Browse files Browse the repository at this point in the history
  • Loading branch information
bretkikehara committed Sep 25, 2015
1 parent 40983fd commit 43f4e85
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,20 @@ All `false` by default.
- {Boolean} **keepBlockTags** - Whether to keep `<!-- build -->` and `<!-- endbuild -->` comments or remove them.
- {Boolean} **resolvePaths** - Try to resolve *relative* paths. For example if your `cwd` is ``/``, your html file is `/page/index.html` and you set replacement as `lib/file.js` the result path in that html will be `../lib/file.js`

###### Options example:
```javascript
htmlreplace({
js: {
src: null,
tpl: '<script src="%f".js></script>'
}
}, {
keepUnassigned: false,
keepBlockTags: false,
resolvePaths: false
})
```

## Example
index.html:

Expand Down

0 comments on commit 43f4e85

Please sign in to comment.