{"id":26122683,"url":"https://github.com/importantimport/literals","last_synced_at":"2026-04-20T12:05:26.230Z","repository":{"id":192420506,"uuid":"686666400","full_name":"importantimport/literals","owner":"importantimport","description":"Super-fast alternative for minify-html-literals. [WIP]","archived":false,"fork":false,"pushed_at":"2023-10-03T08:47:17.000Z","size":167,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-28T05:13:42.951Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/importantimport.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-03T14:56:07.000Z","updated_at":"2024-04-28T05:13:42.952Z","dependencies_parsed_at":"2023-10-03T11:16:57.556Z","dependency_job_id":null,"html_url":"https://github.com/importantimport/literals","commit_stats":null,"previous_names":["importantimport/literals"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/importantimport%2Fliterals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/importantimport%2Fliterals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/importantimport%2Fliterals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/importantimport%2Fliterals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/importantimport","download_url":"https://codeload.github.com/importantimport/literals/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242873754,"owners_count":20199293,"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":[],"created_at":"2025-03-10T15:12:22.105Z","updated_at":"2026-04-20T12:05:26.183Z","avatar_url":"https://github.com/importantimport.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Literals [WIP]\n\n\u003c!-- It's very difficult, and it's not working right now. --\u003e\n\n## Packages\n\n### `@importantimport/minify-html-literals`\n\nSuper-fast alternative for `minify-html-literals`.\n\n```ts\nimport { minifyHTMLLiterals } from '@importantimport/minify-html-literals'\n\nconst result = minifyHTMLLiterals(\n  `function render(title, items) {\n    return html\\`\n      \u003cstyle\u003e\n        .heading {\n          color: blue;\n        }\n      \u003c/style\u003e\n      \u003ch1 class=\"heading\"\u003e\\${title}\u003c/h1\u003e\n      \u003cul\u003e\n        \\${items.map(item =\u003e {\n          return getHTML()\\`\n            \u003cli\u003e\\${item}\u003c/li\u003e\n          \\`;\n        })}\n      \u003c/ul\u003e\n    \\`;\n  }`,\n)\n\nconsole.log(result.code)\n// function render(title, items) {\n//     return html`\u003cstyle\u003e.heading{color:#00f}\u003c/style\u003e\u003ch1 class=\"heading\"\u003e${title}\u003c/h1\u003e\u003cul\u003e${items.map((item)=\u003e{\n//         return getHTML()`\n//             \u003cli\u003e${item}\u003c/li\u003e\n//           `;\n//     })}\u003c/ul\u003e`;\n// }\n```\n\n### `@importantimport/unplugin-minify-html-literals`\n\nSuper-fast alternative for `rollup-plugin-minify-html-literals`.\n\n```ts\n// vite.config.ts\nimport minifyHTML from '@importantimport/unplugin-minify-html-literals'\nimport { defineConfig } from 'vite'\n\nexport default defineConfig({\n  ...config,\n  plugins: [\n    minifyHTML.vite(),\n    ...plugins,\n  ],\n})\n```\n\n## License\n\nlicensed under the [MIT](./LICENSE.md).\n\npartially copies code from the following projects, their licenses are listed in [**Third-party library licenses**](./THIRD-PARTY-LICENSE.md).\n\n| Project       | License       |\n| ------------- | ------------- |\n| [asyncLiz/parse-literals](https://github.com/asyncLiz/parse-literals) | [MIT](https://github.com/asyncLiz/parse-literals/blob/master/LICENSE.md) |\n| [asyncLiz/minify-html-literals](https://github.com/asyncLiz/minify-html-literals) | [MIT](https://github.com/asyncLiz/minify-html-literals/blob/master/LICENSE.md) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimportantimport%2Fliterals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimportantimport%2Fliterals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimportantimport%2Fliterals/lists"}