Skip to content

Commit

Permalink
refactor(playgroud): update template
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Jan 23, 2021
1 parent b2b697e commit c042279
Showing 1 changed file with 7 additions and 36 deletions.
43 changes: 7 additions & 36 deletions playground/src/template/default.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const TEMPLATE_DEFAULT = `# {{ .Version }}
const TEMPLATE_DEFAULT = `## {{ .Version }} ({{ .Date }})
{{- define "body" -}}
{{range . -}}
Expand All @@ -16,46 +16,11 @@ const TEMPLATE_DEFAULT = `# {{ .Version }}
{{ template "body" .Fix }}
{{ end }}
{{if .Refactor}}
### πŸ”¨ Code refactoring:
{{ template "body" .Refactor }}
{{- end -}}
{{if .Test}}
### πŸ§ͺ Testing:
{{ template "body" .Test }}
{{- end -}}
{{if .Perf}}
### ⚑️ Performance improves:
{{ template "body" .Perf }}
{{ end }}
{{if .Build}}
### πŸ—οΈ Build system:
{{ template "body" .Build }}
{{- end -}}
{{if .Ci}}
### πŸš— CI:
{{ template "body" .Ci }}
{{- end -}}
{{if .Chore}}
### πŸ’‘ Chore:
{{ template "body" .Chore }}
{{- end -}}
{{if .Docs}}
### πŸ“š Documentation:
{{ template "body" .Docs }}
{{- end -}}
{{if .Style}}
### πŸŒ‡ Style:
{{ template "body" .Style }}
{{- end -}}
{{if .Revert}}
### πŸ”™ Revert:
{{range .Revert -}}
Expand All @@ -74,9 +39,15 @@ const TEMPLATE_DEFAULT = `# {{ .Version }}
{{ end -}}
{{ end }}
{{ $length := len .Commits }}
{{if gt $length 0}}
### πŸ’ͺ Commits({{ len .Commits }}):
{{range .Commits -}}
- {{ hashURL .Hash}} - {{ unescape .Field.Title }}
{{ end }}
{{ end }}
`;

Expand Down

0 comments on commit c042279

Please sign in to comment.