Added help dialog

This commit is contained in:
Nicolai Ort 2020-12-31 16:15:53 +01:00
parent d0e84f7391
commit 4cfcb18e7a
1 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,13 @@
const fs = require('fs');
const args = process.argv.slice(2);
if(args.includes("--help")){
console.log(`Arguments:
--help: View this help page
--recursive: Include all dependencies' subdependencies
--json: Exports the license information into ./licenses.json as json
--md: Exports the license information into ./licenses.md as markdow`);
}
function parsePackageInfo(path) {
const packagecontents = JSON.parse(fs.readFileSync(path, { encoding: 'utf-8' }));