1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-28 05:05:25 +00:00
code-server-2/scripts/merge.js

19 lines
394 B
JavaScript
Raw Normal View History

2019-07-05 17:44:33 +00:00
const fs = require("fs");
const a = process.argv[2];
const b = process.argv[3];
const out = process.argv[4];
const aJson = JSON.parse(fs.readFileSync(a));
const bJson = JSON.parse(fs.readFileSync(b));
delete aJson.scripts;
delete aJson.dependencies;
delete aJson.devDependencies;
delete aJson.optionalDependencies;
fs.writeFileSync(out, JSON.stringify({
...aJson,
...bJson,
}, null, 2));