Skip to content

Commit

Permalink
README.md: add info on using root (#29)
Browse files Browse the repository at this point in the history
A little more description of how to take advantage of `root` would be useful
  • Loading branch information
msssk authored and jescalan committed Jan 5, 2018
1 parent a868f86 commit 74b3d48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ All options are optional, none are required.
| **alias**| Object with alias mappings, each key is your reference and the corresponding value is the relative path to your file. { button: './views/button.html } | |
| **parserRules**| Array of objects that can include the `test` (regex) and `parser` (fn) keys. See readme for further details | |

#### `root`

Setting `root` to a static value can be useful for managing nested templates. If you attempt to use relative paths in the `src` for your includes it won't always work. If you set `root` to the root folder containing your templates, then you can include any file in any other file using a (partial) full path - partial meaning relative to `root`.

### Reporting Dependencies

This plugin will report its dependencies in the standard format as dictated by [reshape-loader](https://github.com/reshape/loader) if you pass `dependencies: []` as an option to reshape when it runs. Dependencies will be available on the output object under the `dependencies` key. For example:
Expand Down

0 comments on commit 74b3d48

Please sign in to comment.