HTML-Packer-2.11/ 000755 000765 000024 00000000000 14701720170 014712 5 ustar 00leejohnson staff 000000 000000 HTML-Packer-2.11/Changes 000644 000765 000024 00000006200 14701720031 016177 0 ustar 00leejohnson staff 000000 000000 Revision history for HTML-Packer
2.11 2024-10-10
- Merge GH #19: fix unblessed reference (thanks to xvaara)
2.10 2020-01-13
- Merge GH #17: add support for Embedded ECMAScript Modules (thanks to ankitpati)
2.09 2019-07-17
- Merge GH #16: add support for CSP (thanks to ankitpati)
2.08 2019-07-14
- Merge GH #15: allow inheritance by avoiding __PACKAGE__ (thanks to ankitpati)
2.07 2018-04-03
- Fix GH #11: add remove_comments_aggressive options (thanks to girst)
2.06 2017-10-04
- Fix GH #8: proper newlines replacement (#9) (thanks to krizhanovsky)
2.05 2017-04-18
- Makefile.PL moved to ExtUtils::MakeMaker to fix no . in @INC (perl 5.25.11+)
2.04 2017-03-04
- Fix: don't minify none javascript script content (GH #6)
2.03 2016-05-22
- Fix: require recent versions of deps to fix memory leaks
2.02 2016-02-25
- Fix: memory leak due to reference cycles in reggrp_data closures
2.01 2016-01-13
- Fix: newlines should pack to spaces as per W3C (thanks to basbloemsaat)
2.00 2015-06-04
- New maintainer: LEEJO
- Repoint issue tracker/repo at leejo's fork
- Add .travis.yml for CI goodness
- Add Changes test
- Add MYMETA.json to .gitignore
1.004001 2012-02-20
- Use gnutar to build distribution.
1.004 2011-09-27
- Raised version number.
1.003_001 2011-08-19
- Replaced map with foreach.
- Fixed bug in html5 handling. Thanks to Brian Cassidy.
1.002001 2011-06-15
- Fixed embarrassing bug in comment regexp.
- Fixed tests.
- Added TODO.
1.002 2011-06-07
- Raised version number.
1.001_002 2011-05-20
- Fixed tests. Thanks to Kent Fredric.
- Changed possible values for do_javascript options.
1.001_001 2011-04-12
- Added html5 option.
- Removed no_cdata option.
- Added tests.
- Minor bugfixes.
- Cleanup.
1.001001 2011-03-07
- Changed requirements to Regexp::RegGrp 1.000001 due to "undefined submatches bug" in Regexp::RegGrp.
- Added accessors.
- Added tests.
1.000 2011-01-17
- Changed versioning.
- Raised major version due to changes in versioning.
- Changed requirements to Regexp::RegGrp 1.000 due to changes in versioning.
0.05_06 2011-01-05
- Changed requirements to Regexp::RegGrp 0.04.
0.05_05 2010-12-03
- Added no_cdata option.
0.05_04 2010-10-05
- Changed required perl version to 5.8.9.
0.05_03 2010-09-21
- Added option to switch off compression via comment.
- Added support for conditional comments.
- Changed requirements to Regexp::RegGrp 0.0203
- Added tests.
0.05_02 2010-09-13
- Changed requirements to Regexp::RegGrp 0.0201
0.05_01 2009-02-15
- Moved regexp grouping stuff to Regexp::RegGrp.
- Added object-oriented interface.
- Switched tabs to soft tabs.
- Switched to Module::Install.
0.4 2009-02-15
- Another embarrassing typo fix in documentation
- Updated README file
0.3 2009-02-11
- Typo fix in documentation
0.2 2009-02-10
- Added some tests
0.1 2009-02-09
- First version, released on an unsuspecting world.
HTML-Packer-2.11/MANIFEST 000644 000765 000024 00000001213 14701720170 016040 0 ustar 00leejohnson staff 000000 000000 Changes
lib/HTML/Packer.pm
Makefile.PL
MANIFEST
README.md
t/00-load.t
t/01-interface.t
t/02-io.t
t/03-leaks.t
t/04-leaks_full.t
t/gh-6_exempt_some_script_tags.t
t/gh-16_content_security_policy_hashes.t
t/html/s1-expected.html
t/html/s1.html
t/html/s2-expected.html
t/html/s2.html
t/html/s3-expected.html
t/html/s3.html
t/html/s4-expected.html
t/html/s4.html
t/html/s5-expected.html
t/html/s5.html
t/html/s6-expected.html
t/html/s6.html
t/html/s7-expected.html
t/html/s7.html
t/pod.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
HTML-Packer-2.11/t/ 000755 000765 000024 00000000000 14701720170 015155 5 ustar 00leejohnson staff 000000 000000 HTML-Packer-2.11/META.yml 000644 000765 000024 00000001534 14701720170 016166 0 ustar 00leejohnson staff 000000 000000 ---
abstract: 'Another HTML code cleaner'
author:
- 'Lee Johnson '
build_requires:
Test::More: '0'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 7.62, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: HTML-Packer
no_index:
directory:
- t
- inc
requires:
CSS::Packer: '2.01'
Digest::SHA: '0'
JavaScript::Packer: '2.01'
Regexp::RegGrp: 1.001_001
Safe::Isa: '0'
resources:
bugtracker: https://github.com/leejo/html-packer-perl/issues
homepage: https://metacpan.org/module/HTML::Packer
license: http://dev.perl.org/licenses/
repository: https://github.com/leejo/html-packer-perl
version: '2.11'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
HTML-Packer-2.11/META.json 000644 000765 000024 00000002612 14701720170 016334 0 ustar 00leejohnson staff 000000 000000 {
"abstract" : "Another HTML code cleaner",
"author" : [
"Lee Johnson "
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 7.62, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : 2
},
"name" : "HTML-Packer",
"no_index" : {
"directory" : [
"t",
"inc"
]
},
"prereqs" : {
"build" : {
"requires" : {
"Test::More" : "0"
}
},
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
"requires" : {
"CSS::Packer" : "2.01",
"Digest::SHA" : "0",
"JavaScript::Packer" : "2.01",
"Regexp::RegGrp" : "1.001_001",
"Safe::Isa" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/leejo/html-packer-perl/issues"
},
"homepage" : "https://metacpan.org/module/HTML::Packer",
"license" : [
"http://dev.perl.org/licenses/"
],
"repository" : {
"url" : "https://github.com/leejo/html-packer-perl"
}
},
"version" : "2.11",
"x_serialization_backend" : "JSON::PP version 4.06"
}
HTML-Packer-2.11/README.md 000644 000765 000024 00000007361 14701720041 016175 0 ustar 00leejohnson staff 000000 000000 # NAME
HTML::Packer - Another HTML code cleaner
# VERSION
Version 2.11
# DESCRIPTION
A HTML Compressor.
# SYNOPSIS
use HTML::Packer;
my $packer = HTML::Packer->init();
$packer->minify( $scalarref, $opts );
To return a scalar without changing the input simply use (e.g. example 2):
my $ret = $packer->minify( $scalarref, $opts );
For backward compatibility it is still possible to call 'minify' as a function:
HTML::Packer::minify( $scalarref, $opts );
First argument must be a scalarref of HTML-Code.
Second argument must be a hashref of options. Possible options are
- remove\_comments
HTML-Comments will be removed if 'remove\_comments' has a true value. Comments starting with `
Is not set by default.
- html5
If set to a true value closing slashes will be removed from void elements.
- csp
If `do_csp` is set to `'sha256'`, returns a hash that looks like this:
(
'script-src' => [qw( sha256-...= sha256-...= )],
'style-src' => [qw( sha256-...= sha256-...= )],
)
with each element of the `ARRAY`refs containing a CSP-friendly hash for a
`
Hello, World!