load-templates
Version:
113 lines (111 loc) • 6.66 kB
JavaScript
module.exports = {
'0': [ 'a', 'b', fn6 ],
'1': [ 'a', 'b', { a: 'a' }, fn5 ],
'2': [ 'a', 'b', { a: 'a' } ],
'3': [ 'a', fn1, { a: 'b' }, 1, 'b', 2, fn2, { c: 'd' }, 'c' ],
'4': [ 'a', fn4 ],
'5': [ 'a', { a: 'a' }, fn1 ],
'6': [ 'a', { a: 'a' }, fn3 ],
'7': [ 'a', { content: 'A above\n{{body}}\nA below', layout: 'b' } ],
'8': [ 'a', { content: 'This is content.', options: { ext: '.foo' } } ],
'9': [ 'a', { content: 'This is content.' }, { ext: '.foo' } ],
'10': [ 'a', { content: 'this is content', layout: 'b' } ],
'11': [ 'a.md', 'b' ],
'12': [ 'a.md', { content: 'c' } ],
'13': [ 'a.md' ],
'14': [ 'a/b/c.md', 'this is content.', { a: 'b', options: { y: 'z' } } ],
'15': [ 'a/b/c.md', 'this is content.', { a: 'b' }, { options: { y: 'z' } } ],
'16': [ 'a/b/c.md', 'this is content.', { a: 'b' } ],
'17': [ 'a/b/c.md', 'this is content.', { locals: { a: 'b' }, options: { y: 'z' } } ],
'18': [ 'a/b/c.md', 'this is content.', { locals: { a: 'b' } } ],
'19': [ 'a/b/c.md', 'this is content.' ],
'20': [ 'a/b/c.md', { content: 'this is baz', a: 'b', options: { foo: 'bar' } }, { bar: 'baz' } ],
'21': [ 'a/b/c.md', { content: 'this is content.', a: 'b', options: { y: 'z' } } ],
'22': [ 'a/b/c.md', { content: 'this is content.', a: 'b' }, { options: { y: 'z' } } ],
'23': [ 'a/b/c.md', { content: 'this is content.', a: 'b' }, { y: 'z' } ],
'24': [ 'a/b/c.md', { content: 'this is content.', a: 'b' } ],
'25': [ 'a/b/c.md', { content: 'this is content.', locals: { a: 'b' }, options: { y: 'z' } } ],
'26': [ 'a/b/c.md', { content: 'this is content.', locals: { a: 'b' } } ],
'27': [ 'a/b/c.md', { content: 'this is content.' } ],
'28': [ 'abc', { content: '<%= wrap(include("content.tmpl")) %> This is a page!' }, { a: '' } ],
'29': [ 'abc.md', 'This is content.', { a: 'b' }, { c: 'd' } ],
'30': [ 'abc.md', 'This is content.', { a: 'b' }, { locals: { c: 'd' } } ],
'31': [ 'abc.md', 'This is content.', { name: 'Jon Schlinkert' } ],
'32': [ 'abc.md', 'This is content.' ],
'33': [ 'fixtures/two/*.md', { name: 'Brian Woodward' } ],
'34': [ 'foo', { content: 'this is content.', a: 'b' }, { fez: 'foo' } ],
'35': [ 'foo', { content: 'this is content.' } ],
'36': [ 'foo/bar/abc.md', 'This is content.', { a: 'b' }, { c: 'd' } ],
'37': [ 'foo/bar/abc.md', 'This is content.', { a: 'b' } ],
'38': [ 'foo/bar/abc.md', 'This is content.' ],
'39': [ 'foo1.md', 'This is content', { name: 'Jon Schlinkert' } ],
'40': [ 'layouts/*.txt', 'flflflfl', { name: 'Brian Woodward' } ],
'41': [ 'layouts/*.txt', { name: 'Brian Woodward' } ],
'42': [ 'pages/a.md', 'This is content.', { name: 'Jon Schlinkert' } ],
'43': [ 'test/fixtures/*.md', 'flflflfl', { name: 'Brian Woodward' } ],
'44': [ 'test/fixtures/*.md', { a: 'b' }, { engine: 'hbs' } ],
'45': [ 'test/fixtures/*.txt', { a: 'b', options: { b: 'b' } }, { c: true } ],
'46': [ 'test/fixtures/*.txt', { a: 'b' }, { c: true } ],
'47': [ 'test/fixtures/*.txt', { a: 'b' }, { foo: true } ],
'48': [ 'test/fixtures/*.txt', { a: 'b' } ],
'49': [ 'test/fixtures/*.txt', { name: 'Brian Woodward' } ],
'50': [ 'test/fixtures/*.txt' ],
'51': [ 'test/fixtures/a.md', { a: 'b' }, { something: true } ],
'52': [ 'test/fixtures/a.md', { a: 'b' } ],
'53': [ 'test/fixtures/a.md', { foo: 'bar' } ],
'54': [ 'test/fixtures/a.md' ],
'55': [ 'test/fixtures/a.txt', { a: 'b' }, { foo: true } ],
'56': [ 'test/fixtures/one/a.md', { name: 'Brian Woodward' } ],
'57': [ 'test/fixtures/one/a.md' ],
'58': [ 'test/fixtures/three/*.md', { name: 'Brian Woodward' } ],
'59': [ 'whatever', { name: 'Brian Woodward' } ],
'60': [ [ 'test/fixtures/*.md', 'test/fixtures/*.txt' ], { a: 'b' } ],
'61': [ [ 'test/fixtures/*.txt' ], { a: 'b', options: { b: 'b' } }, { c: true } ],
'62': [ [ 'test/fixtures/*.txt' ], { a: 'b', options: { foo: true } } ],
'63': [ [ 'test/fixtures/*.txt' ], { a: 'b' }, { c: true } ],
'64': [ [ 'test/fixtures/*.txt' ], { a: 'b' }, { foo: true } ],
'65': [ [ 'test/fixtures/*.txt' ], { a: 'b' } ],
'66': [ [ 'test/fixtures/*.txt' ], { name: 'Brian Woodward' } ],
'67': [ [ 'test/fixtures/*.txt' ] ],
'68': [ [ 'test/fixtures/a.txt' ], { name: 'Brian Woodward' } ],
'69': [ fn2, { a: 'a' }, { b: 'b' } ],
'70': [ { 'a/b/c.md': { content: 'this is content.', a: 'b', options: { y: 'z' } } } ],
'71': [ { 'a/b/c.md': { content: 'this is content.', a: 'b' } } ],
'72': [ { 'a/b/c.md': { content: 'this is content.', locals: { a: 'b' }, options: { y: 'z' } } } ],
'73': [ { 'a/b/c.md': { content: 'this is content.', locals: { a: 'b' } } } ],
'74': [ { 'a/b/c.md': { content: 'this is content.' } } ],
'75': [ { 'bar1.md': { path: 'a/b/c.md', name: 'Jon Schlinkert' } } ],
'76': [ { 'baz.md': { path: 'a/b/c.md', name: 'Jon Schlinkert' } }, { go: true } ],
'77': [ { foo: { content: 'this is content.', a: 'b' } }, { fez: 'foo' } ],
'78': [ { 'foo/bar.md': { content: 'this is content.', data: { a: 'a' } } } ],
'79': [ { 'foo/bar.md': { content: 'this is content.' } }, { foo: 'bar' } ],
'80': [ { 'foo/bar.md': { content: 'this is content.' } } ],
'81': [ { a: { content: 'A above\n{{body}}\nA below', layout: 'b' } } ],
'82': [ { a: { layout: 'b', content: 'A above\n{{body}}\nA below' } } ],
'83': [ { b: { layout: 'c', content: 'B above\n{{body}}\nB below' } } ],
'84': [ { c: { layout: 'd', content: 'C above\n{{body}}\nC below' } } ],
'85': [ { path: 'a/b/c.md', content: 'this is content.', a: 'b', options: { y: 'z' } }, { c: 'd' }, { e: 'f' } ],
'86': [ { path: 'a/b/c.md', content: 'this is content.', a: 'b', options: { y: 'z' } } ],
'87': [ { path: 'a/b/c.md', content: 'this is content.', a: 'b' } ],
'88': [ { path: 'a/b/c.md', content: 'this is content.', locals: { a: 'b' }, options: { y: 'z' } } ],
'89': [ { path: 'a/b/c.md', content: 'this is content.', locals: { a: 'b' } } ],
'90': [ { path: 'a/b/c.md', content: 'this is content.' } ],
'91': [ { path: 'a/b/c.md', content: 'this is foo' }, { foo: 'bar' } ],
'92': [ { path: 'one/two.md', content: 'this is content.', data: { b: 'b' } } ],
// '93': [fn1, 1, {a: 'b'}, 'a','b', 2, 3, 4, fn2, 'c', 5, {c: 'd'}], // invalid
// '94': [fn1] // invalid
};
var o = {};
// var matter = require('gray-matter');
// var tmpl = matter.read('test/fixtures/a.md');
// var keys = Object.keys(tmpl);
// keys.forEach(function (key) {
// o[key] = tmpl[key];
// });
// console.log(o)
function fn1() { return o; }
function fn2() { return o; }
function fn3() { return o; }
function fn4() { return o; }
function fn5() { return o; }
function fn6() { return o; }