{"id":22423312,"url":"https://github.com/prantlf/grunt-html-html-reporter","last_synced_at":"2026-03-19T22:49:19.534Z","repository":{"id":57255139,"uuid":"111857592","full_name":"prantlf/grunt-html-html-reporter","owner":"prantlf","description":"Formats HTML validation results performed by grunt-html to HTML.","archived":false,"fork":false,"pushed_at":"2022-05-27T08:49:01.000Z","size":230,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T16:58:04.575Z","etag":null,"topics":["grunt-htmlhint","grunt-task","html","reporter"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prantlf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-23T23:30:09.000Z","updated_at":"2022-05-27T08:40:50.000Z","dependencies_parsed_at":"2022-09-04T14:50:32.409Z","dependency_job_id":null,"html_url":"https://github.com/prantlf/grunt-html-html-reporter","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgrunt-html-html-reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgrunt-html-html-reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgrunt-html-html-reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgrunt-html-html-reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prantlf","download_url":"https://codeload.github.com/prantlf/grunt-html-html-reporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791898,"owners_count":20672667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grunt-htmlhint","grunt-task","html","reporter"],"created_at":"2024-12-05T18:09:58.505Z","updated_at":"2026-01-06T06:47:04.020Z","avatar_url":"https://github.com/prantlf.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-html-html-reporter\n\n[![Latest version](https://img.shields.io/npm/v/grunt-html-html-reporter)\n ![Dependency status](https://img.shields.io/librariesio/release/npm/grunt-html-html-reporter)\n](https://www.npmjs.com/package/grunt-html-html-reporter)\n[![Coverage](https://codecov.io/gh/prantlf/grunt-html-html-reporter/branch/master/graph/badge.svg)](https://codecov.io/gh/prantlf/grunt-html-html-reporter)\n\nA custom reporter for [grunt-html] - the HTML validation task - which formats the validation results to HTML. There is a [Grunt] task available for converting already written report files, which uses this reporter - [grunt-html-html-report-converter].\n\n## Installation\n\nYou can use the reporter programmatically. In that case you do not need [Grunt] as stated below. You can also use the reporter directly with the [grunt-html] task. The reporter is usually installed and used together with other development tasks.\n\nYou need [node \u003e= 6][node] and [grunt \u003e= 0.4][Grunt] installed and your project build managed by a [Gruntfile] with the necessary modules listed in [package.json], including [grunt-html]. If you haven't used Grunt before, be sure to check out the [Getting Started] guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with your favourite package manager:\n\n```sh\nnpm i -D grunt-html-html-reporter\npnpm i -D grunt-html-html-reporter\nyarn add -D grunt-html-html-reporter\n```\n\n## Programmatic Usage\n\nYou can use the reporter programmatically to process accessibility results as an object in JavaScript. For example, for converting a JSON report file to a HTML report file:\n\n```js\nconst report = require('grunt-html-html-reporter')\nconst input = fs.readFileSync('report.json', 'utf-8')\nconst results = JSON.parse(input)\nconst output = report(results, {\n  showFileNameOnly: false\n})\nfs.writeFileSync('report.html', output, 'utf-8')\n```\n\n### Options\n\n#### showFileNameOnly\nType: `Boolean`\nDefault value: `false`\n\nCuts the directory from tested HTML files, when creating page titles of them in the report. If you use unique names for files alone, you will not get too long page titles, if you flip this flag tp `true`.\n\n#### showCommonPathOnly\nType: `Boolean`\nDefault value: `true`\n\nCuts the same initial part of the path from tested HTML files, when the paths are used for page titles in the report. If you use sub-directories to organize your files, this option will make the file paths in the report short, but still unique. The default is flipped to `true` already.\n\n## Usage with grunt-html\n\nThe value of the [`reporter`] property of the [`htmllint`] task has to be a path to this module, relative to the `Gruntfile.js`, in which the task is used:\n\n```js\nhtmllint: {\n  options: {\n    errorlevels: ['error', 'warning', 'info'],\n    reporter: './node_modules/grunt-html-html-reporter',\n    reporterOutput: 'output/report.html',\n  },\n  all: {\n    src: ['input/*.html']\n  }\n}\n```\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style.\n\n## License\n\nCopyright (c) 2017-2022 Ferdinand Prantl\n\nLicensed under the MIT license.\n\n[node]: http://nodejs.org\n[package.json]: https://docs.npmjs.com/files/package.json\n[Grunt]: https://gruntjs.com\n[Gruntfile]: http://gruntjs.com/sample-gruntfile\n[Getting Gtarted]: https://github.com/gruntjs/grunt/wiki/Getting-started\n[grunt-html]: https://github.com/jzaefferer/grunt-html\n[`reporter`]: https://github.com/jzaefferer/grunt-html#reporter\n[`htmllint`]: https://github.com/jzaefferer/grunt-html#getting-started\n[grunt-html-html-report-converter]: https://github.com/prantlf/grunt-html-html-report-converter\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fgrunt-html-html-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprantlf%2Fgrunt-html-html-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fgrunt-html-html-reporter/lists"}