rs-diff/scripts/update-package.js
2020-08-14 16:11:58 +08:00

7 lines
191 B
JavaScript

const fs = require('fs')
module.exports = function updatePackageJson(path, partial) {
const old = require(path)
fs.writeFileSync(path, JSON.stringify({ ...old, ...partial }, null, 2))
}