{"id":13774565,"url":"https://github.com/bdadam/rollup-plugin-html","last_synced_at":"2025-05-11T06:33:19.636Z","repository":{"id":57128240,"uuid":"66762016","full_name":"bdadam/rollup-plugin-html","owner":"bdadam","description":"Import HTML files as strings in rollup build","archived":false,"fork":false,"pushed_at":"2018-12-10T07:07:17.000Z","size":12,"stargazers_count":38,"open_issues_count":4,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T10:55:03.851Z","etag":null,"topics":["html-files","minification","npm-package","rollup","rollup-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/bdadam.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2016-08-28T10:18:45.000Z","updated_at":"2024-12-11T19:30:09.000Z","dependencies_parsed_at":"2022-08-26T22:40:50.671Z","dependency_job_id":null,"html_url":"https://github.com/bdadam/rollup-plugin-html","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdadam%2Frollup-plugin-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdadam%2Frollup-plugin-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdadam%2Frollup-plugin-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdadam%2Frollup-plugin-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdadam","download_url":"https://codeload.github.com/bdadam/rollup-plugin-html/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253528415,"owners_count":21922623,"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":["html-files","minification","npm-package","rollup","rollup-plugin"],"created_at":"2024-08-03T17:01:27.998Z","updated_at":"2025-05-11T06:33:19.351Z","avatar_url":"https://github.com/bdadam.png","language":"JavaScript","readme":"# rollup-plugin-html [![Build Status](https://travis-ci.org/bdadam/rollup-plugin-html.svg)](https://travis-ci.org/bdadam/rollup-plugin-html)\n\nRollup plugin for loading content of HTML files to use as string variable in JavaScript code.\n\n## Installation\n\n```bash\nnpm install --save-dev rollup-plugin-html\n```\n\n\n## Usage\n\n```js\nimport { rollup } from 'rollup';\nimport html from 'rollup-plugin-html';\n\nrollup({\n\tentry: 'main.js',\n\tplugins: [\n\t\thtml({\n\t\t\tinclude: '**/*.html'\n\t\t})\n\t]\n}).then(...)\n```\n\n## Options\n\n### include\n\nType: `array` or `string`  \nDefault: `**/*.html`\n\nA single file pattern, or an array of file patterns to include when importing html files. For more details see [rollup-pluginutils](https://github.com/rollup/rollup-pluginutils#createfilter).\n\n### exclude\n\nType: `array` or `string`  \nDefault: `undefined`\n\nA single file pattern, or an array of file patterns to exclude when importing html files. For more details see [rollup-pluginutils](https://github.com/rollup/rollup-pluginutils#createfilter).\n\n### htmlMinifierOptions\n\nType: `Object`\nDefault: `{}`\n\nThe options which are given to [html-minifier](https://github.com/kangax/html-minifier#options-quick-reference)\n\nE.g.:\n```JavaScript\nrollup({\n\tentry: 'main.js',\n\tplugins: [\n\t\thtml({\n\t\t\tinclude: '**/*.html',\n\t\t\thtmlMinifierOptions: {\n\t\t\t\tcollapseWhitespace: true,\n\t\t\t\tcollapseBooleanAttributes: true,\n\t\t\t\tconservativeCollapse: true,\n\t\t\t\tminifyJS: true\n\t\t\t}\n\t\t})\n\t]\n}).then(...)\n```\n\n## License\n\nMIT\n\n## Credits\n\nThanks for Bogdan Chadkin (@TrySound) for his [rollup-plugin-string](https://github.com/TrySound/rollup-plugin-string) rollup plugin which I used as the basis for this plugin.\n","funding_links":[],"categories":["Plugins"],"sub_categories":["Other File Imports"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdadam%2Frollup-plugin-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdadam%2Frollup-plugin-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdadam%2Frollup-plugin-html/lists"}