{"id":17109734,"url":"https://github.com/bleargh45/apache2-filter-minifier-css","last_synced_at":"2025-03-23T21:41:50.848Z","repository":{"id":56833661,"uuid":"330481327","full_name":"bleargh45/Apache2-Filter-Minifier-CSS","owner":"bleargh45","description":"CSS minifying output filter","archived":false,"fork":false,"pushed_at":"2023-10-25T21:45:09.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T05:14:06.685Z","etag":null,"topics":["apache","css-minifier","minification","minify-css","mod-perl"],"latest_commit_sha":null,"homepage":"http://metacpan.org/release/Apache2-Filter-Minifier-CSS/","language":"Perl","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/bleargh45.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-17T20:34:44.000Z","updated_at":"2021-11-06T19:13:51.000Z","dependencies_parsed_at":"2022-09-08T07:42:15.186Z","dependency_job_id":null,"html_url":"https://github.com/bleargh45/Apache2-Filter-Minifier-CSS","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleargh45%2FApache2-Filter-Minifier-CSS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleargh45%2FApache2-Filter-Minifier-CSS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleargh45%2FApache2-Filter-Minifier-CSS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleargh45%2FApache2-Filter-Minifier-CSS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bleargh45","download_url":"https://codeload.github.com/bleargh45/Apache2-Filter-Minifier-CSS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245175322,"owners_count":20572781,"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":["apache","css-minifier","minification","minify-css","mod-perl"],"created_at":"2024-10-14T16:24:12.538Z","updated_at":"2025-03-23T21:41:50.824Z","avatar_url":"https://github.com/bleargh45.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nApache2::Filter::Minifier::CSS - CSS minifying output filter\n\n# SYNOPSIS\n\n```perl\n\u003cLocationMatch \"\\.css$\"\u003e\n    PerlOutputFilterHandler   Apache2::Filter::Minifier::CSS\n\n    # if you need to supplement MIME-Type list\n    PerlSetVar                CssMimeType  text/plain\n\n    # if you want to explicitly specify the minifier to use\n    #PerlSetVar               CssMinifier  CSS::Minifier::XS\n    #PerlSetVar               CssMinifier  CSS::Minifier\n    #PerlSetVar               CssMinifier  MY::Minifier::function\n\u003c/LocationMatch\u003e\n```\n\n# DESCRIPTION\n\n`Apache2::Filter::Minifier::CSS` is a Mod\\_perl2 output filter which minifies\nCSS using `CSS::Minifier` or `CSS::Minifier::XS`.\n\nOnly CSS style-sheets are minified, all others are passed through\nunaltered.  `Apache2::Filter::Minifier::CSS` comes with a list of known\nacceptable MIME-Types for CSS style-sheets, but you can supplement that list\nyourself by setting the `CssMimeType` PerlVar appropriately (use `PerlSetVar`\nfor a single new MIME-Type, or `PerlAddVar` when you want to add multiple\nMIME-Types).\n\nGiven a choice, using `CSS::Minifier::XS` is preferred over `CSS::Minifier`,\nbut we'll use whichever one you've got available.  If you want to explicitly\nspecify which minifier you want to use, set the `CssMinifier` PerlVar to the\nname of the package/function that implements the minifier.  Minification\nfunctions are expected to accept a single parameter (the CSS to be minified)\nand to return the minified CSS on completion.  If you specify a package name,\nwe look for a `minify()` function in that package.\n\n## Caching\n\nMinification does require additional CPU resources, and it is recommended that\nyou use some sort of cache in order to keep this to a minimum.\n\nBeing that you're already running Apache2, though, here's some examples of a\nmod\\_cache setup:\n\nDisk Cache\n\n```\n# Cache root directory\nCacheRoot /path/to/your/disk/cache\n# Enable cache for \"/css/\" location\nCacheEnable disk /css/\n```\n\nMemory Cache\n\n```\n# Cache size: 4 MBytes\nMCacheSize 4096\n# Min object size: 128 Bytes\nMCacheMinObjectSize 128\n# Max object size: 512 KBytes\nMCacheMaxObjectSize 524288\n# Enable cache for \"/css/\" location\nCacheEnable mem /css/\n```\n\n# METHODS\n\n- handler($filter)\n\n    CSS minification output filter.\n\n# AUTHOR\n\nGraham TerMarsch (cpan@howlingfrog.com)\n\nMany thanks to Geoffrey Young for writing `Apache::Clean`, from which several\nthings were lifted. :)\n\n# COPYRIGHT\n\nCopyright (C) 2007, Graham TerMarsch.  All Rights Reserved.\n\nThis is free software; you can redistribute it and/or modify it under the same\nlicense as Perl itself.\n\n# SEE ALSO\n\n- [CSS::Minifier](https://metacpan.org/pod/CSS%3A%3AMinifier)\n- [CSS::Minifier::XS](https://metacpan.org/pod/CSS%3A%3AMinifier%3A%3AXS)\n- [Apache2::Filter::Minifier::JavaScript](https://metacpan.org/pod/Apache2%3A%3AFilter%3A%3AMinifier%3A%3AJavaScript)\n- [Apache::Clean](https://metacpan.org/pod/Apache%3A%3AClean)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleargh45%2Fapache2-filter-minifier-css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbleargh45%2Fapache2-filter-minifier-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleargh45%2Fapache2-filter-minifier-css/lists"}