changelog2html
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -73,3 +73,3 @@ 'use strict'; | ||
.then( | ||
tag => ({ fileName: file, firstTag: tag.tag, commit: tag.commit}), | ||
tag => ({ fileName: file, firstTag: tag.tag.tagName, fileCommit: tag.commit, tagCommit: tag.tag.headCommit}), | ||
error => ({ fileName: file, firstTag: null }) | ||
@@ -99,10 +99,13 @@ ); | ||
if (!versions[file.firstTag]) { | ||
versions[file.firstTag] = {}; | ||
versions[file.firstTag] = { | ||
date: file.tagCommit.date(), | ||
changes: {} | ||
}; | ||
} | ||
versions[file.firstTag][file.fileName] = { | ||
versions[file.firstTag]['changes'][file.fileName] = { | ||
content: content, | ||
contentRendered: rendered, | ||
path: filePath, | ||
date: file.commit.date(), | ||
date: file.fileCommit.date(), | ||
tag: file.firstTag, | ||
@@ -122,2 +125,3 @@ type: matches[2] | ||
.catch(console.error.bind(console)); | ||
} | ||
@@ -197,3 +201,3 @@ | ||
if (tags[i].history[j].sha() == commitHash) { | ||
return tags[i].tagName; | ||
return tags[i]; | ||
} | ||
@@ -200,0 +204,0 @@ } |
{ | ||
"name": "changelog2html", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "A changelog generator which uses git tags to identify versions and dates for found changelog entry files.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -24,7 +24,10 @@ ## changelog2html | ||
### Workflow | ||
### TLDR; | ||
* Create and commit changelog file | ||
* Create regular release and tag your sources using git | ||
* Create a new changelog file with the name pattern [uuid].[changetype].md in your changes folder within your git project. | ||
* Describe your change within that file. I suggest to write a styleguide for other developers. | ||
* Once you are happy with your release create regular release and tag your sources using git | ||
* Run changelog2html over your changelog folder to generate your html changelog file | ||
* Publish the generated changelog.html file somewhere | ||
* Done | ||
@@ -66,16 +69,17 @@ ## Install | ||
{% for versionTag, version in versions %} | ||
<li><h2>{{versionTag}}</h2> | ||
<p> | ||
<ul> | ||
{% for change in version %} | ||
<li> | ||
<h2>{{change.type}} - {{change.tag}} - {{change.date}}</h2> | ||
<p>{{change.contentRendered|safe}}</p> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</p> | ||
</li> | ||
<li><h2>{{versionTag}} - {{version.date|date('F jS, Y') }}</h2> | ||
<p> | ||
<ul> | ||
{% for change in version.changes %} | ||
<li> | ||
<h2>{{change.type}} - {{change.tag}} - {{change.date|date('F jS, Y') }}</h2> | ||
<p>{{change.contentRendered|safe}}</p> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</p> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
``` | ||
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14069
226
84