mirror of
https://github.com/primer/css.git
synced 2024-11-30 19:53:11 +03:00
18 lines
377 B
JavaScript
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() {
|
|
}
|