jacoco-html-asset-bundle
v0.2.1
Published
Make jacoco HTML standalone without requiring image files outside
Downloads
2,414
Readme
jacoco-html-asset-bundle
Bundle and embed image files and CSS files into HTML files so that they will be displayed properly on some context like Azure DevOps Pipelines.
Why?
You would need this, for example, when you are working with Azure DevOps Pipelines and wanna upload your coverage files provided by jacoco-gradle-plugin
.
Even if your test coverage files are generated properly, HTML files would NOT be displayed properly on Azure DevOps Pipelines page because of security concern controlled by their side: Loading external resources inside iframe
seems not allowed.
What does this package do?
jacoco-html-asset-bundle
embeds all the images and CSS files to HTML files who requires those images and CSS.
For example, given
<img src="../jacoco-resources/redbar.gif" width="8" height="10" title="6" alt="6"/>
then
jacoco-html-asset-bundle \
-d jacocoHtml \
-r jacocoHtml/jacoco-resources
-o output \
it will be like
<img src="data:image/gif;base64,R0lGODlhAQAKAOMKAP8PD/8dHf8sLP9KSv9dXf99ff+MjP+goP+mpv+srACtAACtAACtAACtAACtAACtACH5BAEKAA8ALAAAAAABAAoAAAQIMIxyEjJEgAgAOw==" width="8" height="10" title="6" alt="6"/>
so that this HTML file can be displayed without external assets.
Getting started
npm install -g jacoco-html-asset-bundle
jacoco-html-asset-bundle --help