-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli.js
executable file
·35 lines (29 loc) · 897 Bytes
/
cli.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env node
const minimist = require('minimist');
const argv = minimist(process.argv.slice(2), {
string: ['exclude'],
boolean: ['no-styles', 'no-types', 'help', 'include-ignored'],
alias: {
e: 'exclude',
h: 'help',
i: 'include-ignored'
}
});
if (argv.help) {
console.log(`
Usage: node-to-md [options]
Options:
--no-styles Exclude style definitions
--no-types Exclude type definitions
-e, --exclude Exclude files/directories using glob patterns
(comma-separated, e.g., "test/**,*.spec.*")
-i, --include-ignored Include files that match .gitignore patterns
-h, --help Show this help message
Examples:
node-to-md --no-styles
node-to-md --exclude "test/**,*.spec.*"
node-to-md --no-types --include-ignored
`);
process.exit(0);
}
require('./index.js');