1
1
mirror of https://github.com/primer/css.git synced 2024-12-03 03:33:40 +03:00
css/docs/lib/changelog.js

18 lines
377 B
JavaScript
Raw Normal View History

2018-12-07 22:29:26 +03:00
const {readFileSync} = require('fs')
module.exports = function addChangelog(sourcePath, destPath, transform = noop) {
return (files, metal, done) => {
const path = metal.path(metal.source(), sourcePath)
const file = {
contents: readFileSync(path),
path: destPath
}
transform(file)
files[destPath] = file
done()
}
}
function noop() {
}