mirror of
https://github.com/primer/css.git
synced 2024-11-23 11:27:26 +03:00
12 lines
284 B
JavaScript
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)
|
|
}
|
|
})
|
|
}
|