1
1
mirror of https://github.com/primer/css.git synced 2024-11-30 19:53:11 +03:00
css/docs/lib/changelog.js
2018-12-17 15:26:50 -08:00

18 lines
377 B
JavaScript

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() {
}