jacoco-html-asset-bundle

0.2.1 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.1
    757
    • latest

Version History

Package Sidebar

Install

npm i jacoco-html-asset-bundle

Weekly Downloads

624

Version

0.2.1

License

MIT

Unpacked Size

25.6 kB

Total Files

6

Last publish

Collaborators

  • otiai10