Skip to content

Instantly share code, notes, and snippets.

View Paul-Isache's full-sized avatar
👓

Paul Isache Paul-Isache

👓
View GitHub Profile
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const packageJSONPath = path.resolve(__dirname, "./package.json");
const packageJSON = require(packageJSONPath);
packageJSON.bundleDependencies = Object.keys(packageJSON.dependencies);
const newPkgContents = JSON.stringify(packageJSON, null, 2);
fs.writeFileSync(packageJSONPath, newPkgContents);
console.log("Updated bundleDependencies");