load-templates
Version:
52 lines (36 loc) • 948 B
Markdown
# {%= name %} {%= badge("fury") %}
> {%= description %}
## Install
{%= include("install-npm", {save: true}) %}
## Run tests
```bash
npm test
```
## Usage
```js
var Loader = require('{%= name %}');
var loader = new Loader();
```
Throw some disorganized templates into the load method:
```js
loader.load('a.md', {a: 'b'});
loader.load('*.md', {a: 'b'});
loader.load(['*.md'], {a: 'b'});
loader.load({path: 'a.md', a: 'b'});
loader.load({'a.md': {path: 'a.md', a: 'b'}});
```
And get shiny, normalized template objects back:
```js
{ 'a.md': {path: 'a.md', content: 'this is content.', a: 'b'},
'b.md': {path: 'b.md', content: 'this is content.', a: 'b'},
'c.md': {path: 'c.md', content: 'this is content.', a: 'b'}}
```
### Valid formats
See [the docs](./docs/conventions.md) and [tests](./tests) for valid formats. WIP.
## Author
{%= include("author") %}
## License
{%= copyright() %}
{%= license() %}
***
{%= include("footer") %}