-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(conventional-changelog): handle BREAKING CHANGE in footer and bo…
…dy (#32)
- Loading branch information
Showing
4 changed files
with
95 additions
and
41 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
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
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 |
---|---|---|
@@ -1,12 +1,17 @@ | ||
#!/usr/bin/env node | ||
|
||
const { parser } = require('..') | ||
const { parser, toConventionalChangelogFormat } = require('..') | ||
const inspect = require('unist-util-inspect') | ||
const { hideBin } = require('yargs/helpers') | ||
const yargs = require('yargs/yargs')(hideBin(process.argv)) | ||
|
||
yargs | ||
.command('$0 <message>', 'Output the parsed syntax tree', () => {}, (argv) => { | ||
.command('$0 <message>', 'output the parsed syntax tree', () => {}, (argv) => { | ||
console.log(inspect(parser(argv.message))) | ||
}) | ||
.command('cc <message>', 'output conventional changelog format commit', () => {}, (argv) => { | ||
const cc = toConventionalChangelogFormat(parser(argv.message)) | ||
console.log('-----') | ||
console.log(JSON.stringify(cc, null, 2)) | ||
}) | ||
.parse() |
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