mirror of
https://github.com/primer/css.git
synced 2024-12-01 04:21:12 +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() {
|
|
}
|