{"id":19686680,"url":"https://github.com/tinovyatkin/babel-plugin-html-tag","last_synced_at":"2025-04-29T06:31:30.600Z","repository":{"id":32082565,"uuid":"131524447","full_name":"tinovyatkin/babel-plugin-html-tag","owner":"tinovyatkin","description":"Statically evaluates and minifies tagged html`\u003c..\u003e` template literals into strings","archived":false,"fork":false,"pushed_at":"2023-11-09T11:41:55.000Z","size":3457,"stargazers_count":6,"open_issues_count":10,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-27T20:18:00.319Z","etag":null,"topics":["babel","babel-plugin","html","template-literals"],"latest_commit_sha":null,"homepage":null,"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/tinovyatkin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-29T19:45:18.000Z","updated_at":"2023-04-02T11:49:08.000Z","dependencies_parsed_at":"2023-02-15T20:31:37.134Z","dependency_job_id":"3c7b495d-a75e-43dd-9982-1b8d52d84efb","html_url":"https://github.com/tinovyatkin/babel-plugin-html-tag","commit_stats":{"total_commits":708,"total_committers":8,"mean_commits":88.5,"dds":"0.26412429378531077","last_synced_commit":"01cf915bf6a423741be73e48efbb015dcaad15db"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinovyatkin%2Fbabel-plugin-html-tag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinovyatkin%2Fbabel-plugin-html-tag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinovyatkin%2Fbabel-plugin-html-tag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinovyatkin%2Fbabel-plugin-html-tag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinovyatkin","download_url":"https://codeload.github.com/tinovyatkin/babel-plugin-html-tag/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251450656,"owners_count":21591407,"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":["babel","babel-plugin","html","template-literals"],"created_at":"2024-11-11T18:29:48.706Z","updated_at":"2025-04-29T06:31:30.068Z","avatar_url":"https://github.com/tinovyatkin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-plugin-html-tag\n\nStatically evaluates and minifies tagged `` html`\u003c..\u003e` `` template literals into strings\n\n![npm](https://img.shields.io/npm/v/babel-plugin-html-tag.svg)\n[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) [![codecov](https://codecov.io/gh/tinovyatkin/babel-plugin-html-tag/branch/master/graph/badge.svg)](https://codecov.io/gh/tinovyatkin/babel-plugin-html-tag)\n![node](https://img.shields.io/node/v/babel-plugin-html-tag.svg)\n\n## What it does:\n\nMinifies tagged template literals (by default using `html` tag) via `html-minifier` then removes the tag:\n\nIn:\n\n```js\nconst a = html`\u003cp class=\"zoom center justify\"\u003e\n  This is paragraph with ${b} subsitutions at several lines: ${1 + 2}\n\u003c/p\u003e`;\n\nconst z = html`\u003ctable class=\"center\"\u003e\n  \u003ctr class=\"left\"\u003e\n    \u003ctd\u003eHTML without substitutions\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e`;\n```\n\nOut:\n\n```js\nconst a = `\u003cp class=\"zoom center justify\"\u003eThis is paragraph with ${b} subsitutions at several lines: ${\n  1 + 2\n}\u003c/p\u003e`;\n\n// becomes static one line string if there is no substitutions\nconst z =\n  '\u003ctable class=\"center\"\u003e\u003ctr class=\"left\"\u003e\u003ctd\u003eHTML without substitutions\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e';\n```\n\n### Tip\n\nTry it with Visual Studio Code [bierner.lit-html](https://marketplace.visualstudio.com/items?itemName=bierner.lit-html) plugin for beautiful syntax highlight and HTML autocomplete inside tagged HTML string.\n\n## Credits\n\nInspired by [babel-plugin-template-html-minifier](https://github.com/goto-bus-stop/babel-plugin-template-html-minifier) and [babel-plugin-graphql-tag](https://github.com/gajus/babel-plugin-graphql-tag)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinovyatkin%2Fbabel-plugin-html-tag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinovyatkin%2Fbabel-plugin-html-tag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinovyatkin%2Fbabel-plugin-html-tag/lists"}