forked from github-tools/github-release-notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgren-changelog.js
More file actions
35 lines (31 loc) · 980 Bytes
/
gren-changelog.js
File metadata and controls
35 lines (31 loc) · 980 Bytes
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
import Program from '../dist/Program';
import Gren from '../dist/Gren';
import { globalOptions, changelogOptions } from './_options';
import { green } from 'chalk';
const changelogCommand = new Program({
name: `${green('gren')} changelog`,
description: 'Create a CHANGELOG.md file, based on release notes',
argv: process.argv,
cwd: process.cwd(),
options: changelogOptions.concat(globalOptions),
events: {
'--help': () => {
console.log('');
console.log(' Basic Examples:');
console.log('');
console.log(' $ gren changelog');
console.log('');
console.log(' $ gren changelog --generate');
console.log('');
}
}
});
changelogCommand.init()
.then(options => {
const changelogAction = new Gren(options);
return changelogAction.changelog();
})
.catch(error => {
console.error(error);
});