-
Notifications
You must be signed in to change notification settings - Fork 8
/
notes
executable file
·25 lines (19 loc) · 1.28 KB
/
notes
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
#!/usr/bin/env node
"use strict";
const program = require('commander');
const Notes = require('../lib/notes');
const Package = require('../package.json');
program
.version(Package.version)
.description('Tool to summarise all code annotation like TODO or FIXME')
.option('-s, --source [dir]', 'root directory to be included only for checks (default: current working directory)')
.option('-x, --patterns [dir]', 'Path patterns to exclude (default: include all files and directories)',
function collect(val, collector) { collector.push("" + val); return collector; }, [])
.option('-i, --include [dir]', 'Path patterns to include only (default: include all files and directories). Note that include patterns will overwrite any exclude patterns',
function collect(val, collector) { collector.push("" + val); return collector; }, [])
.option('-e, --encoding [type]', 'file encoding to be scanned (default: utf8)')
.option('-l, --line-length <n>', 'number of max characters a line (default: 1000)', parseInt)
.option('-h, --ignore-hidden <n>', 'ignore hidden files (default: false)')
.option('-g, --git-ignore <n>', 'ignore patterns from your .gitignore file. This paramter accepts the path for the .gitIgnore file (default: false | no .gitignore is read')
.parse(process.argv);
Notes(program);