metalsmith-filemetadata
metalsmith-filemetadata copied to clipboard
feature: interpolate values
I've added interpolation of values so plugin calls can specify metadata values like { cover: 'images/{title}.jpg' }.
IDK if this is poor form, but I switched from minimatch to multimatch as it seems like that's become the defacto standard for metalsmith plugins. Doing that meant that it was sensible to fold the setmetadata fn back into the primary fn. So it looks like I've taken a knife to the original plugin but that wasn't really my intention.
Running "mochaTest:test" (mochaTest) task
>> Mocha exploded!
>> SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
>> at exports.runInThisContext (vm.js:53:16)
>> at Module._compile (module.js:387:25)
>> at Object.Module._extensions..js (module.js:422:10)
>> at Module.load (module.js:357:32)
>> at Function.Module._load (module.js:314:12)
>> at Module.require (module.js:367:17)
>> at require (internal/module.js:20:19)
>> at Object.<anonymous> (/home/travis/build/dpobel/metalsmith-filemetadata/tests/file-metadata.js:3:10)
>> at Module._compile (module.js:413:34)
>> at Object.Module._extensions..js (module.js:422:10)
Warning: Task "mochaTest:test" failed. Use --force to continue.
That sucked.. can we test against node 6 or do we need node 5 compat ?