1
1
mirror of https://github.com/primer/css.git synced 2024-11-23 11:27:26 +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)
}
})
}