Skip to content

Commit 020ce87

Browse files
committed
add release-it changelog generation
1 parent a962d2e commit 020ce87

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

changelog.hbs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{#each releases}}
2+
{{#if @first}}
3+
{{#each merges}}
4+
- {{{message}}}{{#if href}} [`#{{id}}`]({{href}}){{/if}}
5+
{{/each}}
6+
{{#each fixes}}
7+
- {{{commit.subject}}}{{#each fixes}}{{#if href}} [`#{{id}}`]({{href}}){{/if}}{{/each}}
8+
{{/each}}
9+
{{#each commits}}
10+
- {{#if breaking}}**Breaking change:** {{/if}}{{{subject}}}{{#if href}} [`{{shorthash}}`]({{href}}){{/if}}
11+
{{/each}}
12+
{{/if}}
13+
{{/each}}

package.json

+12-2
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,22 @@
138138
"devDependencies": {
139139
"eslint": "^5.9.0",
140140
"mocha": "^5.2.0",
141+
"nexe": "^3.2.0",
141142
"precommit": "^1.2.2",
142-
"standard": "12.0.1",
143-
"nexe": "^3.2.0"
143+
"standard": "12.0.1"
144144
},
145145
"pkg": {
146146
"scripts": "lib/**/*.js",
147147
"assets": "patterns.yml"
148+
},
149+
"release-it": {
150+
"github": {
151+
"release": true,
152+
"changelog": "npx auto-changelog --stdout --commit-limit false -u --template ./changelog.hbs"
153+
},
154+
"scripts": {
155+
"beforeStage": "npx auto-changelog -p",
156+
"changelog": "npx auto-changelog --stdout --commit-limit false --unreleased --template ./preview.hbs"
157+
}
148158
}
149159
}

0 commit comments

Comments
 (0)