{"id":15649455,"url":"https://github.com/alehatsman/clj-html-compressor","last_synced_at":"2026-04-27T12:02:17.990Z","repository":{"id":62431453,"uuid":"95881206","full_name":"alehatsman/clj-html-compressor","owner":"alehatsman","description":"Clojure interlop library for html compressing.","archived":false,"fork":false,"pushed_at":"2017-07-05T20:51:08.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-14T07:43:07.780Z","etag":null,"topics":["clojure","html-compressing","java"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/alehatsman.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":"2017-06-30T11:09:08.000Z","updated_at":"2020-12-06T16:02:31.000Z","dependencies_parsed_at":"2022-11-01T20:46:40.947Z","dependency_job_id":null,"html_url":"https://github.com/alehatsman/clj-html-compressor","commit_stats":null,"previous_names":["atsman/clj-html-compressor"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/alehatsman/clj-html-compressor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alehatsman%2Fclj-html-compressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alehatsman%2Fclj-html-compressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alehatsman%2Fclj-html-compressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alehatsman%2Fclj-html-compressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alehatsman","download_url":"https://codeload.github.com/alehatsman/clj-html-compressor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alehatsman%2Fclj-html-compressor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32335297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["clojure","html-compressing","java"],"created_at":"2024-10-03T12:29:49.698Z","updated_at":"2026-04-27T12:02:17.959Z","avatar_url":"https://github.com/alehatsman.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLJ-HTML-COMPRESSOR\n\n[![Clojars Project](https://img.shields.io/clojars/v/clj-html-compressor.svg)](https://clojars.org/clj-html-compressor)\n\nClojure interlop library for [htmlcompressor](https://code.google.com/archive/p/htmlcompressor/)\n\n## Usage\n\n```clojure\n(ns you-project-ns\n  (:require [clj-html-compressor.core :as compressor]))\n\n; with one argument and default settings\n(compressor/compress html)\n\n; or two arguments, first html string, second compiler configuration\n(compressor/compress html {})\n```\n\n## Config options (with default values)\n\n```clojure\n{:compress-css false ; Enables CSS compression within \u003cstyle\u003e tags using Yahoo YUI Compressor if set to true.\n :css-compressor nil ; Sets CSS compressor implementation that will be used to compress inline CSS in HTML.\n :compress-javascript false ; Enables JavaScript compression within \u003cscript\u003e tags using Yahoo YUI Compressor if set to true.\n :javascript-compressor nil ; Sets JavaScript compressor implementation that will be used to compress inline JavaScript in HTML.\n :enabled true ; If set to false all compression will be bypassed.\n :generate-statistics false ; If set to true, HTML compression statistics will be generated.\n :preserve-line-breaks false ; If set to true, line breaks will be preserved.\n :preserve-patterns nil ; This method allows setting custom block preservation rules defined by regular expression patterns.\n :remove-comments true ; If set to true all HTML comments will be removed.\n :remove-form-attributes false ; If set to true, method=\"get\" attributes will be removed from \u003cform\u003e tags. Default is false.\n :remove-http-protocol false ; If set to true, HTTP protocol will be removed from href, src, cite, and action tag attributes.\n :remove-https-protocol false ; If set to true, HTTPS protocol will be removed from href, src, cite, and action tag attributes.\n :remove-input-attributes false ; If set to true, type=\"text\" attributes will be removed from \u003cinput\u003e tags.\n :remove-intertag-spaces false ; If set to true all inter-tag whitespace characters will be removed.\n :remove-javascript-protocol false ; If set to true, javascript: pseudo-protocol will be removed from inline event handlers.\n :remove-link-attributes false ; If set to true, following attributes will be removed from \u003clink rel=\"stylesheet\"\u003e and \u003clink rel=\"alternate stylesheet\"\u003e tags: type=\"text/css\" type=\"text/plain\"\n :remove-multi-spaces true ; If set to true all multiple whitespace characters will be replaced with single spaces.\n :remove-quotes false ; If set to true all unnecessary quotes will be removed from tag attributes.\n :remove-script-attributes false ; If set to true, following attributes will be removed from \u003cscript\u003e tags: type=\"text/javascript\" type=\"application/javascript\" language=\"javascript\"\n :remove-style-attributes false ; If set to true, type=\"text/style\" attributes will be removed from \u003cstyle\u003e tags.\n :remove-surrounding-spaces nil ; Enables surrounding spaces removal around provided comma separated list of tags.\n :simple-boolean-attributes false ; If set to true, any values of following boolean attributes will be removed: checked selected disabled readonly\n :simple-doctype false ; If set to true, existing DOCTYPE declaration will be replaced with simple \u003c!DOCTYPE html\u003e declaration.\n :yui-css-line-break -1 ; Tells Yahoo YUI Compressor to break lines after the specified number of symbols during CSS compression.\n :yui-error-reporter nil ; Sets ErrorReporter that YUI Compressor will use for reporting errors during JavaScript compression.\n :yui-js-disable-optimizations false ; Tells Yahoo YUI Compressor to disable all the built-in micro optimizations during JavaScript compression.\n :yui-js-line-break -1 ; Tells Yahoo YUI Compressor to break lines after the specified number of symbols during JavaScript compression.\n :yui-js-no-munge false ; Tells Yahoo YUI Compressor to only minify javascript without obfuscating local symbols.\n :yui-js-preserve-all-semicolons false} ; Tells Yahoo YUI Compressor to preserve unnecessary semicolons during JavaScript compression.\n```\n\n## Testing\n\nRun command: `lein test`\n\n## Contributing\n\n1. Fork it!\n2. Create branch `git checkout -b my-fix-branch master\n3. Commit your changes: `git commit -am '\u003ctype\u003e(\u003cscope\u003e): \u003csubject\u003e'. See Commit Message Format below.\n4. Push to the branch: `git push origin my-fix-branch`\n5. Submit a pull request!\n\n```bash\ngit clone https://github.com/Atsman/clj-html-compressor.git\ncd clj-html-compressor\nlein install\n```\n## \u003ca name=\"commit\"\u003e\u003c/a\u003e Git Commit Guidelines\n\nWe have very precise rules over how our git commit messages can be formatted.  This leads to **more\nreadable messages** that are easy to follow when looking through the **project history**.\n\n### Commit Message Format\nEach commit message consists of a **header**, a **body** and a **footer**.  The header has a special\nformat that includes a **type**, a **scope** and a **subject**:\n\n```\n\u003ctype\u003e(\u003cscope\u003e): \u003csubject\u003e\n\u003cBLANK LINE\u003e\n\u003cbody\u003e\n\u003cBLANK LINE\u003e\n\u003cfooter\u003e\n```\n\nThe **header** is mandatory and the **scope** of the header is optional.\n\nAny line of the commit message cannot be longer 100 characters! This allows the message to be easier\nto read on GitHub as well as in various git tools.\n\n### Revert\nIf the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.\nIn the body it should say: `This reverts commit \u003chash\u003e.`, where the hash is the SHA of the commit being reverted.\n\n### Type\nMust be one of the following:\n\n* **feat**: A new feature\n* **fix**: A bug fix\n* **docs**: Documentation only changes\n* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing\n  semi-colons, etc)\n* **refactor**: A code change that neither fixes a bug nor adds a feature\n* **perf**: A code change that improves performance\n* **test**: Adding missing or correcting existing tests\n* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation\n  generation\n\n### Scope\nThe scope could be anything specifying place of the commit change. For example `$location`,\n`$browser`, `$compile`, `$rootScope`, `ngHref`, `ngClick`, `ngView`, etc...\n\nYou can use `*` when the change affects more than a single scope.\n\n### Subject\nThe subject contains succinct description of the change:\n\n* use the imperative, present tense: \"change\" not \"changed\" nor \"changes\"\n* don't capitalize first letter\n* no dot (.) at the end\n\n### Body\nJust as in the **subject**, use the imperative, present tense: \"change\" not \"changed\" nor \"changes\".\nThe body should include the motivation for the change and contrast this with previous behavior.\n\n### Footer\nThe footer should contain any information about **Breaking Changes** and is also the place to\n[reference GitHub issues that this commit closes][closing-issues].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falehatsman%2Fclj-html-compressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falehatsman%2Fclj-html-compressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falehatsman%2Fclj-html-compressor/lists"}