This repository was archived by the owner on Jun 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.js
More file actions
executable file
·45 lines (41 loc) · 1.36 KB
/
cli.js
File metadata and controls
executable file
·45 lines (41 loc) · 1.36 KB
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
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env node
'use strict';
var meow = require('meow');
var changelog = require('./');
var cli = meow({
help: [
'Usage',
' $ changelog',
'',
'Options',
' -b, --base Specify the path of the git repo. By default, all file',
' paths are relative to process.cwd().',
' -c, --commitish The commit-ish from which you want to generate the',
' changelog. Default to `${latest-tag}..HEAD`.',
' -p, --preset The preset to use in order to generate the change log.',
' You can chose `grunt`, `jquery` or `node` presets. If no',
' preset is specified, then a simple changelog will be',
' generated.',
' -r, --release The version of the upcoming release. If not specified,',
' the cli will read the version from `package.json`.',
' -V, --verbose Output more detailed information.',
' -h, --help Display this notice.',
'',
'Examples',
' $ changelog',
' $ changelog --base /home/github/changelog-generator',
' $ changelog -c 1.0.0..HEAD -p jquery -r 1.0.1'
]
}, {
alias: {
b: 'base',
c: 'commitish',
h: 'help',
p: 'preset',
r: 'release',
V: 'verbose'
},
string: ['base', 'commitish', 'preset', 'release'],
boolean: ['verbose']
});
console.log(changelog(cli.flags));