diff --git a/exporter.js b/exporter.js index 55e05f6..83b584d 100644 --- a/exporter.js +++ b/exporter.js @@ -46,4 +46,9 @@ function getDependencyLicenseInfo(all_dependencies, recursive){ const packageInfo = parsePackageInfo(`./package.json`); const all = getDependencyLicenseInfo(mergeDependencies(packageInfo), args.includes("--recursive")); -fs.writeFileSync('./licenses.json', JSON.stringify(all)); \ No newline at end of file +if(args.includes("--pretty")){ + fs.writeFileSync('./licenses.json', JSON.stringify(all, null, 4)); +} +else{ + fs.writeFileSync('./licenses.json', JSON.stringify(all)); +} \ No newline at end of file