mirror of
https://github.com/primer/css.git
synced 2024-12-02 07:53:06 +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)
|
|
}
|
|
})
|
|
}
|