Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
lib/CSS/ | H | 02-Mar-2021 | - | 507 | 282 | |
t/ | H | 02-Mar-2021 | - | 560 | 414 | |
Changes | H A D | 02-Mar-2021 | 2.5 KiB | 91 | 67 | |
MANIFEST | H A D | 02-Mar-2021 | 897 | 37 | 36 | |
META.json | H A D | 02-Mar-2021 | 1.3 KiB | 56 | 55 | |
META.yml | H A D | 02-Mar-2021 | 795 | 30 | 29 | |
Makefile.PL | H A D | 05-Nov-2018 | 779 | 33 | 28 | |
README.md | H A D | 06-Nov-2018 | 2.9 KiB | 118 | 71 |
README.md
1# NAME 2 3CSS::Packer - Another CSS minifier 4 5<div> 6 7 <a href='https://travis-ci.org/leejo/css-packer-perl?branch=master'><img src='https://travis-ci.org/leejo/css-packer-perl.svg?branch=master' alt='Build Status' /></a> 8 <a href='https://coveralls.io/r/leejo/css-packer-perl'><img src='https://coveralls.io/repos/leejo/css-packer-perl/badge.png?branch=master' alt='Coverage Status' /></a> 9</div> 10 11# VERSION 12 13Version 2.07 14 15# DESCRIPTION 16 17A fast pure Perl CSS minifier. 18 19# SYNOPSIS 20 21 use CSS::Packer; 22 23 my $packer = CSS::Packer->init(); 24 25 $packer->minify( $scalarref, $opts ); 26 27To return a scalar without changing the input simply use (e.g. example 2): 28 29 my $ret = $packer->minify( $scalarref, $opts ); 30 31For backward compatibility it is still possible to call 'minify' as a function: 32 33 CSS::Packer::minify( $scalarref, $opts ); 34 35First argument must be a scalarref of CSS-Code. 36Second argument must be a hashref of options. Possible options are: 37 38- compress 39 40 Defines compression level. Possible values are 'minify' and 'pretty'. 41 Default value is 'pretty'. 42 43 'pretty' converts 44 45 a { 46 color: black 47 ;} div 48 49 { width:100px; 50 } 51 52 to 53 54 a{ 55 color:black; 56 } 57 div{ 58 width:100px; 59 } 60 61 'minify' converts the same rules to 62 63 a{color:black;}div{width:100px;} 64 65- indent 66 67 Defines number of spaces, used for indentation. Used only when compress is 'pretty'. 68 Default value is 0. 69 70- copyright 71 72 You can add a copyright notice at the top of the script. 73 74- remove\_copyright 75 76 If there is a copyright notice in a comment it will only be removed if this 77 option is set to a true value. Otherwise the first comment that contains the 78 word "copyright" will be added at the top of the packed script. A copyright 79 comment will be overwritten by a copyright notice defined with the copyright 80 option. 81 82- no\_compress\_comment 83 84 If not set to a true value it is allowed to set a CSS comment that 85 prevents the input being packed or defines a compression level. 86 87 /* CSS::Packer _no_compress_ */ 88 /* CSS::Packer pretty */ 89 90# AUTHOR 91 92Merten Falk, `<nevesenin at cpan.org>`. Now maintained by Lee 93Johnson (LEEJO) 94 95# BUGS 96 97Please report any bugs or feature requests through 98the web interface at [http://github.com/leejo/css-packer-perl/issues](http://github.com/leejo/css-packer-perl/issues). I will be notified, and then you'll 99automatically be notified of progress on your bug as I make changes. 100 101# SUPPORT 102 103You can find documentation for this module with the perldoc command. 104 105perldoc CSS::Packer 106 107# COPYRIGHT & LICENSE 108 109Copyright 2008 - 2011 Merten Falk, all rights reserved. 110 111This program is free software; you can redistribute it and/or modify it 112under the same terms as Perl itself. 113 114# SEE ALSO 115 116[CSS::Minifier](https://metacpan.org/pod/CSS::Minifier), 117[CSS::Minifier::XS](https://metacpan.org/pod/CSS::Minifier::XS) 118