1
1
mirror of https://github.com/primer/css.git synced 2024-12-02 07:53:06 +03:00
css/lib/write-meta.js
2019-02-04 12:55:18 -08:00

12 lines
284 B
JavaScript

const matter = require('gray-matter')
const each = require('./each')
module.exports = function writeMeta({namespace = 'data'}) {
return each(file => {
const data = file[namespace]
if (data) {
file.contents = matter.stringify(String(file.contents), data)
}
})
}