{"id":22367608,"url":"https://github.com/hugojosefson/merge-html","last_synced_at":"2026-05-02T13:34:48.126Z","repository":{"id":38282586,"uuid":"279065575","full_name":"hugojosefson/merge-html","owner":"hugojosefson","description":"CLI and module for merging two or more .html files together.","archived":false,"fork":false,"pushed_at":"2023-01-06T11:17:44.000Z","size":1698,"stargazers_count":5,"open_issues_count":13,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-08T23:44:02.492Z","etag":null,"topics":["cli","combine","esmodule","html","merge","module","node"],"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/hugojosefson.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":"2020-07-12T13:02:38.000Z","updated_at":"2025-08-24T16:55:49.000Z","dependencies_parsed_at":"2023-02-05T23:16:17.382Z","dependency_job_id":null,"html_url":"https://github.com/hugojosefson/merge-html","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/hugojosefson/merge-html","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fmerge-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fmerge-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fmerge-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fmerge-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugojosefson","download_url":"https://codeload.github.com/hugojosefson/merge-html/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fmerge-html/sbom","scorecard":{"id":472807,"data":{"date":"2025-08-11","repo":{"name":"github.com/hugojosefson/merge-html","commit":"175602941a068af9f0fbabb2bcddda2ab71a867e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"41 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-wg6g-ppvx-927h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-7wwv-vh3v-89cq","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4","Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653","Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj","Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67","Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w","Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2","Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-9q5w-79cv-947m","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx","Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq","Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T14:23:34.271Z","repository_id":38282586,"created_at":"2025-08-19T14:23:34.271Z","updated_at":"2025-08-19T14:23:34.271Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32536579,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli","combine","esmodule","html","merge","module","node"],"created_at":"2024-12-04T18:19:22.949Z","updated_at":"2026-05-02T13:34:48.101Z","avatar_url":"https://github.com/hugojosefson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @hugojosefson/merge-html\n\n[![Build Status](https://travis-ci.org/hugojosefson/merge-html.svg?branch=master)](https://travis-ci.org/hugojosefson/merge-html)\n[![npm page](https://img.shields.io/npm/v/@hugojosefson/merge-html.svg)](https://npmjs.com/package/@hugojosefson/merge-html)\n[![License MIT](https://img.shields.io/npm/l/@hugojosefson/merge-html.svg)](https://tldrlegal.com/license/mit-license)\n[![SemVer 2.0.0](https://img.shields.io/badge/SemVer-2.0.0-lightgrey.svg)](https://semver.org/spec/v2.0.0.html)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Introduction\n\nCLI and module for merging two or more `.html` files together.\n\n## Prerequisite\n\nNode.js, `v13.7.0` or higher, ideally at least `v14.0.0`.\n\nRecommended to install latest via [nvm](https://github.com/nvm-sh/nvm#readme):\n\n```bash\nnvm install stable\n```\n\n## Usage\n\n```bash\nnpx --package @hugojosefson/merge-html \\\n  merge-html input1.html input2.html [...inputN.html] \\\n  \u003e output.html\n```\n\nWill merge all the input html files, and redirect the output to `output.html`.\n\n### Minification\n\nBy default, the output HTML is minified using\n[html-minifier-terser](https://www.npmjs.com/package/html-minifier-terser) with\n[DEFAULT_MINIFY_OPTIONS](#default_minify_options).\n\nYou may change it by setting the `MERGE_HTML_MINIFY` environment variable to a\nboolean, or to a valid JSON object with configuration options. For example:\n\n```bash\nMERGE_HTML_MINIFY=false \\\nnpx --package @hugojosefson/merge-html \\\n  merge-html input1.html input2.html \u003e \\\n  non-minified.html\n```\n\n...or...\n\n```bash\nMERGE_HTML_MINIFY='{\"decodeEntities\": true, \"keepClosingSlash\": true, \"maxLineLength\": 80}' \\\nnpx --package @hugojosefson/merge-html \\\n  merge-html input1.html input2.html \u003e \\\n  special-minified.html\n```\n\n## Programmatic access\n\nYou can also add the module to your project, `import` it, and use its default\nexported function programmatically.\n\n```bash\nyarn add @hugojosefson/merge-html\n```\n\n```js\nimport merge from '@hugojosefson/merge-html'\n\nconst html1 = `\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eExample\u003c/title\u003e\n    \u003cscript src=\"legacy.js\" async nomodule\u003e\u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cp\u003eHello\u003c/p\u003e`\n\nconst html2 = `\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eExample\u003c/title\u003e\n    \u003cscript src=\"modern.mjs\" type=module\u003e\u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cp\u003eWorld\u003c/p\u003e`\n\nconsole.log(merge([html1, html2]))\n```\n\nThe above example would output:\n\n    \u003c!DOCTYPE html\u003e\u003chtml\u003e\u003chead\u003e\u003ctitle\u003eExample\u003c/title\u003e\u003cscript src=\"legacy.js\" async nomodule=\"\"\u003e\u003c/script\u003e\u003cscript src=\"modern.mjs\" type=\"module\"\u003e\u003c/script\u003e\u003c/head\u003e\u003cbody\u003e\u003cp\u003eHello\u003c/p\u003e\u003cp\u003eWorld\u003c/p\u003e\u003c/body\u003e\u003c/html\u003e\n\n... which when pretty-printed is:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eExample\u003c/title\u003e\n    \u003cscript src=\"legacy.js\" async nomodule=\"\"\u003e\u003c/script\u003e\n    \u003cscript src=\"modern.mjs\" type=\"module\"\u003e\u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cp\u003eHello\u003c/p\u003e\n    \u003cp\u003eWorld\u003c/p\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### merge\n\n[src/merge.mjs:15-20](https://github.com/hugojosefson/merge-html/blob/ed7f703815e3ea0706a6da8e351882740c216325/src/merge.mjs#L15-L20 'Source code on GitHub')\n\nMerges two or more HTML strings together.\n\n##### Parameters\n\n- `htmls`\n  **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e**\n  Array of HTML documents, each as a string.\n- `minifyOptions`\n  **([boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n  \\|\n  [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object))**\n  Can be `true`, `false` or an object with options for\n  [html-minifier-terser](https://www.npmjs.com/package/html-minifier-terser).\n  (optional, default `DEFAULT_MINIFY_OPTIONS`)\n\nReturns\n**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**\nThe resulting HTML document.\n\n#### DEFAULT_MINIFY_OPTIONS\n\n[src/fn/minify.mjs:17-20](https://github.com/hugojosefson/merge-html/blob/ed7f703815e3ea0706a6da8e351882740c216325/src/fn/minify.mjs#L17-L20 'Source code on GitHub')\n\nDefault `minifyOptions` for `merge()`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugojosefson%2Fmerge-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugojosefson%2Fmerge-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugojosefson%2Fmerge-html/lists"}