CSS-Squish
view release on metacpan or search on metacpan
lib/CSS/Squish.pm view on Meta::CPAN
content of file using file_handle method which as well lookup files in roots.
If roots are not defined then files are treated as absolute paths or relative
to the current directory. Using of absolute paths is not recommended as
unhide server dirrectory layout to clients in css comments and as well don't
allow to handle @import commands with absolute URIs. When files is found we
parse its content for @import commands. On each URI we call resolve_uri method
that convert absolute and relative URIs into file paths.
Here is example of processing:
roots: /www/overlay/, /www/shared/
$squisher->concatenate('/css/main.css');
->file_handle('/css/main.css');
->resolve_file('/css/main.css');
<- '/www/shared/css/main.css';
<- handle;
content parsing
find '@import url(nav.css)'
( run in 0.317 second using v1.01-cache-2.11-cpan-49f99fa48dc )