-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
421 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env node | ||
|
||
import {Command} from 'commander'; | ||
import {createRulesTable} from '../lib/index.js'; | ||
import {version} from '../lib/version.js'; | ||
|
||
const program = new Command(); | ||
program | ||
.version(version) | ||
.option('-c, --cwd <directory>', 'Directory to work from. Defaults to cwd, and looks for package.json up from there.') | ||
.option('-r, --readme <readme name>', 'Name of readme file. Relative to package.json', 'README.md') | ||
.parse(); | ||
|
||
try { | ||
await createRulesTable(program.opts()); | ||
} catch (er) { | ||
// eslint-disable-next-line no-console | ||
console.error(er.message); | ||
process.exit(1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.