rs-diff/scripts/update-package.js

7 lines
191 B
JavaScript
Raw Normal View History

2020-08-14 08:11:58 +00:00
const fs = require('fs')
module.exports = function updatePackageJson(path, partial) {
const old = require(path)
fs.writeFileSync(path, JSON.stringify({ ...old, ...partial }, null, 2))
}