conventional-changelog-writer
Version:
Write logs based on conventional commits and templates.
86 lines (79 loc) • 2.24 kB
JavaScript
export const mainTemplate = `{{> header}}
{{#each commitGroups}}
{{#each commits}}
{{> commit root=}}
{{/each}}
{{/each}}
{{> footer}}
`;
export const headerPartial = `## {{#if isPatch~}} <small>
{{~/if~}} {{version}}
{{~#if title}} "{{title}}"
{{~/if~}}
{{~#if date}} ({{date}})
{{~/if~}}
{{~#if isPatch~}} </small>
{{~/if}}
`;
export const commitPartial = `* {{header}}
{{~!-- commit link --}}
{{~#if .linkReferences}} ([{{hash}}](
{{~#if .repository}}
{{~#if .host}}
{{~.host}}/
{{~/if}}
{{~#if .owner}}
{{~.owner}}/
{{~/if}}
{{~.repository}}
{{~else}}
{{~.repoUrl}}
{{~/if}}/
{{~.commit}}/{{hash}}))
{{~else if hash}} {{hash}}{{~/if}}
{{~!-- commit references --}}
{{~#if references~}}
, closes
{{~#each references}} {{#if .linkReferences~}}
[
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}](
{{~#if .repository}}
{{~#if .host}}
{{~.host}}/
{{~/if}}
{{~#if this.repository}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}
{{~else}}
{{~#if .owner}}
{{~.owner}}/
{{~/if}}
{{~.repository}}
{{~/if}}
{{~else}}
{{~.repoUrl}}
{{~/if}}/
{{~.issue}}/{{this.issue}})
{{~else}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}
{{~/if}}{{/each}}
{{~/if}}
`;
export const footerPartial = `{{#if noteGroups}}
{{#each noteGroups}}
### {{title}}
{{#each notes}}
* {{text}}
{{/each}}
{{/each}}
{{/if}}
`;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVtcGxhdGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3RlbXBsYXRlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsTUFBTSxZQUFZLEdBQUc7Ozs7Ozs7O0NBUTNCLENBQUE7QUFFRCxNQUFNLENBQUMsTUFBTSxhQUFhLEdBQUc7Ozs7Ozs7OztDQVM1QixDQUFBO0FBRUQsTUFBTSxDQUFDLE1BQU0sYUFBYSxHQUFHOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Q0FzRDVCLENBQUE7QUFFRCxNQUFNLENBQUMsTUFBTSxhQUFhLEdBQUc7Ozs7Ozs7Ozs7Q0FVNUIsQ0FBQSJ9