{"id":17109730,"url":"https://github.com/bleargh45/apache2-filter-minifier-javascript","last_synced_at":"2025-03-23T21:41:51.357Z","repository":{"id":56840656,"uuid":"330464060","full_name":"bleargh45/Apache2-Filter-Minifier-JavaScript","owner":"bleargh45","description":"JavaScript minifying output filter for mod_perl","archived":false,"fork":false,"pushed_at":"2023-10-25T21:45:07.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T05:14:06.741Z","etag":null,"topics":["apache","javascript-minifier","minification","minify-javascript","mod-perl"],"latest_commit_sha":null,"homepage":"http://metacpan.org/release/Apache2-Filter-Minifier-JavaScript/","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,"governance":null}},"created_at":"2021-01-17T18:56:40.000Z","updated_at":"2021-11-06T19:13:47.000Z","dependencies_parsed_at":"2022-08-28T23:31:02.995Z","dependency_job_id":"209ad2d0-3f28-4c6d-8b94-319b6c2501eb","html_url":"https://github.com/bleargh45/Apache2-Filter-Minifier-JavaScript","commit_stats":{"total_commits":46,"total_committers":1,"mean_commits":46.0,"dds":0.0,"last_synced_commit":"f652f3a580b18d32b2feba3424cce4e929a4b499"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleargh45%2FApache2-Filter-Minifier-JavaScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleargh45%2FApache2-Filter-Minifier-JavaScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleargh45%2FApache2-Filter-Minifier-JavaScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleargh45%2FApache2-Filter-Minifier-JavaScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bleargh45","download_url":"https://codeload.github.com/bleargh45/Apache2-Filter-Minifier-JavaScript/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","javascript-minifier","minification","minify-javascript","mod-perl"],"created_at":"2024-10-14T16:24:11.780Z","updated_at":"2025-03-23T21:41:51.324Z","avatar_url":"https://github.com/bleargh45.png","language":"Perl","readme":"# NAME\n\nApache2::Filter::Minifier::JavaScript - JavaScript minifying output filter for mod\\_perl\n\n# SYNOPSIS\n\n```perl\n\u003cLocationMatch \"\\.js$\"\u003e\n    PerlOutputFilterHandler   Apache2::Filter::Minifier::JavaScript\n\n    # if you need to supplement MIME-Type list\n    PerlSetVar                JsMimeType  text/json\n\n    # if you want to explicitly specify the minifier to use\n    #PerlSetVar               JsMinifier  JavaScript::Minifier::XS\n    #PerlSetVar               JsMinifier  JavaScript::Minifier\n    #PerlSetVar               JsMinifier  MY::Minifier::function\n\u003c/LocationMatch\u003e\n```\n\n# DESCRIPTION\n\n`Apache2::Filter::Minifier::JavaScript` is a Mod\\_perl2 output filter which\nminifies JavaScript using `JavaScript::Minifier` or\n`JavaScript::Minifier::XS`.\n\nOnly JavaScript documents are minified, all others are passed through\nunaltered.  `Apache2::Filter::Minifier::JavaScript` comes with a list of\nseveral known acceptable MIME-Types for JavaScript documents, but you can\nsupplement that list yourself by setting the `JsMimeType` PerlVar\nappropriately (use `PerlSetVar` for a single new MIME-Type, or `PerlAddVar`\nwhen you want to add multiple MIME-Types).\n\nGiven a choice, using `JavaScript::Minifier::XS` is preferred over\n`JavaScript::Minifier`, but we'll use whichever one you've got available.  If\nyou want to explicitly specify which minifier you want to use, set the\n`JsMinifier` PerlVar to the name of the package/function that implements the\nminifier.  Minification functions are expected to accept a single parameter\n(the JavaScript to be minified) and to return the minified JavaScript on\ncompletion.  If you specify a package name, we look for a `minify()` function\nin 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 \"/js/\" location\nCacheEnable disk /js/\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 \"/js/\" location\nCacheEnable mem /js/\n```\n\n# METHODS\n\n- handler($filter)\n\n    JavaScript 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- [JavaScript::Minifier](https://metacpan.org/pod/JavaScript%3A%3AMinifier)\n- [JavaScript::Minifier::XS](https://metacpan.org/pod/JavaScript%3A%3AMinifier%3A%3AXS)\n- [Apache2::Filter::Minifier::CSS](https://metacpan.org/pod/Apache2%3A%3AFilter%3A%3AMinifier%3A%3ACSS)\n- [Apache::Clean](https://metacpan.org/pod/Apache%3A%3AClean)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleargh45%2Fapache2-filter-minifier-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbleargh45%2Fapache2-filter-minifier-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleargh45%2Fapache2-filter-minifier-javascript/lists"}