1 2 3 4 5 6 7 8 9 10 11 12 13 14
'use strict'; const fs = require("fs"); const packageJson = JSON.parse( fs.readFileSync("wow.export/package.json") ); packageJson.dependencies["pkg"] = "^5.8.1"; fs.writeFileSync( "wow.export/package.json", JSON.stringify(packageJson) );