{"id":18358876,"url":"https://github.com/uppercod/rollup-plugin-input-html","last_synced_at":"2025-04-10T03:07:48.647Z","repository":{"id":113251460,"uuid":"188962038","full_name":"UpperCod/rollup-plugin-input-html","owner":"UpperCod","description":"This plugins allows the export of relative mjs modules from .HTML files, similar to the work of parceljs, but using ESM modules.","archived":false,"fork":false,"pushed_at":"2022-12-03T11:24:10.000Z","size":32,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-23T22:26:56.645Z","etag":null,"topics":["html","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UpperCod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-28T05:47:45.000Z","updated_at":"2020-01-20T03:22:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"1204d180-b951-4782-9a63-14f06bcebb9d","html_url":"https://github.com/UpperCod/rollup-plugin-input-html","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Frollup-plugin-input-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Frollup-plugin-input-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Frollup-plugin-input-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Frollup-plugin-input-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UpperCod","download_url":"https://codeload.github.com/UpperCod/rollup-plugin-input-html/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239036171,"owners_count":19571456,"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","rollup","rollup-plugin"],"created_at":"2024-11-05T22:19:47.514Z","updated_at":"2025-02-15T18:30:02.438Z","avatar_url":"https://github.com/UpperCod.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rollup-plugin-input-html\n\nThis plugins allows the export of relative mjs modules from .HTML files, similar to the work of parceljs, but using ESM modules.\n\n## Example:\n\n### input: index.html\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\t\u003chead\u003e\n\t\t\u003cmeta charset=\"UTF-8\" /\u003e\n\t\t\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n\t\t\u003cmeta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" /\u003e\n\t\t\u003ctitle\u003eDocument\u003c/title\u003e\n\t\u003c/head\u003e\n\t\u003cbody\u003e\n\t\t\u003cscript type=\"module\" src=\"./app-1.js\"\u003e\u003c/script\u003e\n\t\t\u003cscript type=\"module\" src=\"./app-2.js\"\u003e\u003c/script\u003e\n\t\u003c/body\u003e\n\u003c/html\u003e\n```\n\n### output: index.html\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\t\u003chead\u003e\n\t\t\u003cmeta charset=\"UTF-8\" /\u003e\n\t\t\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n\t\t\u003cmeta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" /\u003e\n\t\t\u003ctitle\u003eDocument\u003c/title\u003e\n\t\u003c/head\u003e\n\t\u003cbody\u003e\n\t\t\u003cscript type=\"module\" src=\"./index.js\"\u003e\u003c/script\u003e\n\t\u003c/body\u003e\n\u003c/html\u003e\n```\n\nscript, `src=\"./index.js\"` has the group of `src=\"./app-1.js\"` and `src=\"./app-2.js\"`.\n\n```js\nimport inputHTML from \"@atomico/rollup-plugin-input-html\";\n\nexport default {\n\tinput: \"index.html\", //or can use fast-glob expressions, example: *.html, ui-*.html\n\toutput: {\n\t\tdir: \"./dist\",\n\t\tformat: \"esm\",\n\t\tsourcemap: true\n\t},\n\tplugins: [inputHTML() /** ,...otherPlugins **/]\n};\n```\n\n## default configuration\n\n```js\nlet defaultOptions = {\n\tinclude: [\"**/*.html\"],\n\texclude: [],\n\tcreateHTML: true // allows the creation of the html file based on the origin\n};\n```\n\n#### This plugins must be included as the first element, in order to transfer the modules to the bundle.\n\n### Multiple inputs\n\nYou can also use multiple entries supported by rollup, this generate chuck, which group the code between 1 or more html files.\n\n## ⚠️ RULE\n\ndo not import html nested in folders outside of root or inside root, since for now this plugins will resolve the path but the rollup import generates a non-deep bundle in directory. **logical is a bundle**.\n\n## This plugins uses the power of\n\n[fast-glob](https://github.com/mrmlnc/fast-glob): small utility for the recovery of files based on search expressions.\n[rollup-pluginutils]: allows to generate include and exclude plugins format.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuppercod%2Frollup-plugin-input-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuppercod%2Frollup-plugin-input-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuppercod%2Frollup-plugin-input-html/lists"}