Skip to content

Instantly share code, notes, and snippets.

@phcostabh
Created April 18, 2017 18:23
Show Gist options
  • Select an option

  • Save phcostabh/85fae3e78e8ae31caa35c42589407368 to your computer and use it in GitHub Desktop.

Select an option

Save phcostabh/85fae3e78e8ae31caa35c42589407368 to your computer and use it in GitHub Desktop.
const fs = require("fs");
fs.readFile("./manifest.json", (err, file) => {
const parsed = JSON.parse(file.toString());
const dependencies = parsed.dependencies;
Object.keys(dependencies).forEach(d => {
console.log("");
console.log("[[dependencies]]");
console.log(` name = "${d}"`);
const info = dependencies[d];
Object.keys(info).forEach(i => {
console.log(` ${i} = "${info[i]}"`);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment