Skip to content

Commit

Permalink
Merge pull request #4 from markschellhas/feature/sitemap
Browse files Browse the repository at this point in the history
adds default screen if command not found
  • Loading branch information
markschellhas authored Mar 1, 2024
2 parents d8c27d8 + f7a934e commit 7b5ff8f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,21 @@ prog
createSitemap(url);
});


// if command not found, show help
prog
.command('*')
.action(() => {
console.log(CONSOLE_COLOR.GREEN, `
Welcome to chic.js!
--------------------
`);
// show version:
console.log(CONSOLE_COLOR.BLUE, `Version: ${prog.version()}`);
// show author:
console.log(CONSOLE_COLOR.BLUE, `Author: ${prog.author}`);
prog.outputHelp();
});

prog.parse(process.argv);

/**
Expand Down

0 comments on commit 7b5ff8f

Please sign in to comment.