[Rt-commit] rt branch, squish-refactor, updated. rt-3.9.7-877-g554a047
? sunnavy
sunnavy at bestpractical.com
Wed Dec 15 02:21:02 EST 2010
The branch, squish-refactor has been updated
via 554a047fcc9a302ae9ddc376aa9e7d45d1905236 (commit)
via a8fdf26395898635f353b4da29c98f048a1791a6 (commit)
via 7950a0f0bd0f2f89a51774fafd04bc73d4be13cd (commit)
via e4490f633584cecf2db42c57cb887a250afbbf44 (commit)
from 24f7810c6e90969fc9900c4f8ef79cc35543516c (commit)
Summary of changes:
lib/RT/Interface/Web.pm | 30 +++++
lib/RT/{SharedSettings.pm => Squish.pm} | 131 ++++++++++----------
lib/RT/{SharedSettings.pm => Squish/CSS.pm} | 123 +++++++++---------
lib/RT/Squish/JS.pm | 185 +++++++++++++++++++++++++++
share/html/Elements/Header | 15 ++-
share/html/Elements/HeaderJavascript | 13 ++-
share/html/NoAuth/css/dhandler | 25 +---
share/html/NoAuth/js/dhandler | 45 +------
8 files changed, 379 insertions(+), 188 deletions(-)
copy lib/RT/{SharedSettings.pm => Squish.pm} (54%)
copy lib/RT/{SharedSettings.pm => Squish/CSS.pm} (54%)
create mode 100644 lib/RT/Squish/JS.pm
- Log -----------------------------------------------------------------
commit e4490f633584cecf2db42c57cb887a250afbbf44
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Dec 15 15:15:33 2010 +0800
squish classes
diff --git a/lib/RT/Squish.pm b/lib/RT/Squish.pm
new file mode 100644
index 0000000..ec34c69
--- /dev/null
+++ b/lib/RT/Squish.pm
@@ -0,0 +1,154 @@
+# BEGIN BPS TAGGED BLOCK {{{
+#
+# COPYRIGHT:
+#
+# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
+# <jesse at bestpractical.com>
+#
+# (Except where explicitly superseded by other copyright notices)
+#
+#
+# LICENSE:
+#
+# This work is made available to you under the terms of Version 2 of
+# the GNU General Public License. A copy of that license should have
+# been provided with this software, but in any event can be snarfed
+# from www.gnu.org.
+#
+# This work is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 or visit their web page on the internet at
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+#
+#
+# CONTRIBUTION SUBMISSION POLICY:
+#
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+#
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+#
+# END BPS TAGGED BLOCK }}}
+
+=head1 SYNOPSIS
+
+ use RT::Squish;
+ my $squish = RT::Squish->new(
+ Name => 'foo',
+ Files => [ '/path/to/a', '/path/to/b' ],
+ );
+
+=head1 DESCRIPTION
+
+This module lets you create squished content of files.
+
+to add files automatically by the name, you can create method named
+UpdateFilesByName in your subclass to do this, see
+C<RT::Squish::CSS::UpdateFilesByName>
+and C<RT::Squish::JS::UpdateFilesByName> for example.
+
+=head1 METHODS
+
+=cut
+
+use strict;
+use warnings;
+
+package RT::Squish;
+use base 'Class::Accessor::Fast';
+__PACKAGE__->mk_accessors(qw/Files Content Key ModifiedTime Name/);
+
+use Digest::MD5 'md5_hex';
+
+=head2 new (ARGS)
+
+ARGS is a hash of named parameters. Valid parameters are:
+
+ Name - name for this object
+ Files - a reference to a list of files to be squished
+
+=cut
+
+sub new {
+ my $class = shift;
+ my %args = @_;
+ my $self = \%args;
+ bless $self, $class;
+
+ $self->Files( $args{Files} || [] );
+ $self->UpdateFilesByName() if $self->can('UpdateFilesByName');
+
+ my $content = $self->SquishFiles;
+ $self->Content($content);
+ $self->Key( md5_hex $content );
+ $self->ModifiedTime( time() );
+
+ return $self;
+}
+
+=head2 SquishFiles
+
+default squish action is just concatenating files.
+return the concatenated content.
+
+you can subclass this method to customize the squish way.
+
+=cut
+
+sub SquishFiles {
+ my $self = shift;
+ my $files = $self->Files;
+ my $c = '';
+ local $/;
+ for my $file (@$files) {
+ open my $fh, '<', $file or die "can't open $file: $!";
+ $c .= <$fh>;
+ }
+
+ return $c;
+}
+
+=head2 Name
+
+this object's name, to distinguish with other objects
+
+=head2 Files
+
+arrayref of files to be squished.
+
+=head2 Key
+
+=head2 Content
+
+squished content
+
+=head2 Key
+
+md5 of the squished content
+
+=cut
+
+=head2 ModifiedTime
+
+created time of squished content, i.e. seconds since 00:00:00 UTC, January 1, 1970
+
+=cut
+
+1;
+
diff --git a/lib/RT/Squish/CSS.pm b/lib/RT/Squish/CSS.pm
new file mode 100644
index 0000000..aa52d30
--- /dev/null
+++ b/lib/RT/Squish/CSS.pm
@@ -0,0 +1,153 @@
+# BEGIN BPS TAGGED BLOCK {{{
+#
+# COPYRIGHT:
+#
+# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
+# <jesse at bestpractical.com>
+#
+# (Except where explicitly superseded by other copyright notices)
+#
+#
+# LICENSE:
+#
+# This work is made available to you under the terms of Version 2 of
+# the GNU General Public License. A copy of that license should have
+# been provided with this software, but in any event can be snarfed
+# from www.gnu.org.
+#
+# This work is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 or visit their web page on the internet at
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+#
+#
+# CONTRIBUTION SUBMISSION POLICY:
+#
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+#
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+#
+# END BPS TAGGED BLOCK }}}
+
+=head1 SYNOPSIS
+
+ use RT::Squish::CSS;
+ my $squish = RT::Squish::CSS->new(
+ Name => 'aileron',
+ );
+
+=head1 DESCRIPTION
+
+This module lets you create squished content of css files.
+
+=head1 METHODS
+
+=cut
+
+use strict;
+use warnings;
+
+package RT::Squish::CSS;
+use base 'RT::Squish', 'CSS::Squish';
+__PACKAGE__->mk_accessors('style');
+use List::MoreUtils 'uniq';
+
+=head2 SquishFiles
+
+use CSS::Squish to squish css
+
+=cut
+
+sub SquishFiles {
+ my $self = shift;
+ return $self->concatenate( @{ $self->Files } );
+}
+
+=head2 UpdateFilesMap
+
+name => files map
+
+this is mainly for plugins, e.g.
+
+to add extra css files for style 'aileron', you can add the following line
+in the plugin's main file:
+
+ require RT::Squish::CSS;
+ RT::Squish::CSS->UpdateFilesMap( aileron => ['/NoAuth/css/foo.css'] );
+
+=cut
+
+my %FILES_MAP;
+
+sub UpdateFilesMap {
+ my $self = shift;
+ my %args = @_;
+
+ for my $name ( keys %args ) {
+ next unless $name;
+ my $files = $args{$name};
+ $FILES_MAP{$name} ||= [];
+ push @{ $FILES_MAP{$name} }, ref $files eq 'ARRAY' ? @$files : $files;
+ }
+ return 1;
+}
+
+=head2 UpdateFilesByName
+
+update files by name, it find files in the following places:
+
+1. if the name is a style name, add the style's corresponding main.css
+2. if there is a files map for the name, add the corresponding files.
+
+=cut
+
+sub UpdateFilesByName {
+ my $self = shift;
+
+ my $name = $self->Name;
+ my $main = File::Spec->catfile( '/NoAuth', 'css', $name, 'main.css' );
+
+ if ( -e File::Spec->catfile( $RT::MasonComponentRoot, $main ) ) {
+ $self->Files( [ uniq @{$self->Files}, $main ] );
+ }
+
+ if ( $FILES_MAP{$name} ) {
+ $self->Files( [ uniq @{$self->Files}, @{$FILES_MAP{$name}} ] );
+ }
+
+ return 1;
+}
+
+=head2 file_handle
+
+subclass CSS::Squish::file_handle for RT
+
+=cut
+
+sub file_handle {
+ my $self = shift;
+ my $file = shift;
+ my $content = $HTML::Mason::Commands::m->scomp($file) || '';
+ open my $fh, '<', \$content or die "$!";
+ return $fh;
+}
+
+1;
+
diff --git a/lib/RT/Squish/JS.pm b/lib/RT/Squish/JS.pm
new file mode 100644
index 0000000..73274a8
--- /dev/null
+++ b/lib/RT/Squish/JS.pm
@@ -0,0 +1,184 @@
+# BEGIN BPS TAGGED BLOCK {{{
+#
+# COPYRIGHT:
+#
+# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
+# <jesse at bestpractical.com>
+#
+# (Except where explicitly superseded by other copyright notices)
+#
+#
+# LICENSE:
+#
+# This work is made available to you under the terms of Version 2 of
+# the GNU General Public License. A copy of that license should have
+# been provided with this software, but in any event can be snarfed
+# from www.gnu.org.
+#
+# This work is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 or visit their web page on the internet at
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+#
+#
+# CONTRIBUTION SUBMISSION POLICY:
+#
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+#
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+#
+# END BPS TAGGED BLOCK }}}
+
+=head1 SYNOPSIS
+
+ use RT::Squish::JS;
+ my $squish = RT::Squish::JS->new(
+ Name => 'head',
+ Files => ['...'],
+ );
+
+=head1 DESCRIPTION
+
+This module lets you create squished content of js files.
+
+=head1 METHODS
+
+=cut
+
+use strict;
+use warnings;
+
+package RT::Squish::JS;
+use base 'RT::Squish';
+use List::MoreUtils 'uniq';
+
+=head2 SquishFiles
+
+not just concatenate files, but also minify them
+
+=cut
+
+sub SquishFiles {
+ my $self = shift;
+ my $content;
+
+ for my $file ( @{ $self->Files } ) {
+ $content .= $HTML::Mason::Commands::m->scomp($file);
+ }
+
+ return $self->Filter($content);
+}
+
+=head2 UpdateFilesMap
+
+name => files map
+
+this is mainly for plugins, e.g.
+
+to add extra css files for style 'aileron', you can add the following line
+in the plugin's main file:
+
+ require RT::Squish::JS;
+ RT::Squish::JS->UpdateFilesMap( aileron => ['/NoAuth/js/foo.js'] );
+
+=cut
+
+my %FILES_MAP;
+
+sub UpdateFilesMap {
+ my $self = shift;
+ my %args = @_;
+
+ for my $name ( keys %args ) {
+ next unless $name;
+ my $files = $args{$name};
+ $FILES_MAP{$name} ||= [];
+ push @{ $FILES_MAP{$name} }, ref $files eq 'ARRAY' ? @$files : $files;
+ }
+ return 1;
+}
+
+=head2 UpdateFilesByName
+
+update files by name, it'll try to find files in the following places:
+
+1. if the name is 'head', add files in config item C<JSFilesInHead>.
+2. if there is a files map for the name, add the corresponding files.
+
+=cut
+
+sub UpdateFilesByName {
+ my $self = shift;
+ my $name = $self->Name;
+
+ if ( $name eq 'head' ) {
+ $self->Files(
+ [
+ uniq @{ $self->Files },
+ map { "/NoAuth/js/$_" } RT->Config->Get('JSFilesInHead'),
+ ]
+ );
+ }
+
+ if ( $FILES_MAP{$name} ) {
+
+ $self->Files( [ uniq @{$self->Files}, @{$FILES_MAP{$name}} ] );
+ }
+
+
+ return 1;
+}
+
+sub Filter {
+ my $self = shift;
+ my $content = shift;
+
+ my $minified;
+ my $jsmin = RT->Config->Get('JSMinPath');
+ if ( $jsmin && -x $jsmin ) {
+ my $input = $content;
+ my ( $output, $error );
+
+ local $SIG{'CHLD'} = 'DEFAULT';
+ require IPC::Run3;
+ IPC::Run3::run3( [$jsmin], \$input, \$output, \$error );
+ if ( $? >> 8 ) {
+ $RT::Logger->warning("failed to jsmin: $error ");
+ }
+ else {
+ $content = $output;
+ $minified = 1;
+ }
+ }
+
+ unless ($minified) {
+ eval { require JavaScript::Minifier };
+ if ($@) {
+ $RT::Logger->debug("can't load JavaScript::Minifier: $@");
+ }
+ else {
+ $content = JavaScript::Minifier::minify( input => $content );
+ }
+ }
+ return $content;
+}
+
+1;
+
commit 7950a0f0bd0f2f89a51774fafd04bc73d4be13cd
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Dec 15 15:16:32 2010 +0800
implement SquishedCSS and SquishedJS in RT::Interface::Web
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index da6040d..5d12400 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -70,6 +70,36 @@ use RT::Interface::Web::Session;
use Digest::MD5 ();
use Encode qw();
+=head2 SquishedCSS Name => $name, Files => [...]
+
+=cut
+
+my %SQUISHED_CSS;
+sub SquishedCSS {
+ my %args = @_;
+ my $name = $args{Name} or die "need Name";
+ return $SQUISHED_CSS{$name} if $SQUISHED_CSS{$name};
+ require RT::Squish::CSS;
+ my $css = RT::Squish::CSS->new(%args);
+ $SQUISHED_CSS{ $css->Name } = $css;
+ return $css;
+}
+
+=head2 SquishedJS Name => $name, Files => [...]
+
+=cut
+
+my %SQUISHED_JS;
+sub SquishedJS {
+ my %args = @_;
+ my $name = $args{Name} or die "need Name";
+ return $SQUISHED_JS{$name} if $SQUISHED_JS{$name};
+
+ require RT::Squish::JS;
+ my $js = RT::Squish::JS->new(%args);
+ $SQUISHED_JS{ $js->Name } = $js;
+ return $js;
+}
=head2 EscapeUTF8 SCALARREF
commit a8fdf26395898635f353b4da29c98f048a1791a6
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Dec 15 15:17:56 2010 +0800
use RT::Squish* in mason
diff --git a/share/html/Elements/Header b/share/html/Elements/Header
index c0e8605..c7fdf30 100755
--- a/share/html/Elements/Header
+++ b/share/html/Elements/Header
@@ -56,7 +56,7 @@
% }
<link rel="shortcut icon" href="<%RT->Config->Get('WebImagesURL')%>/favicon.png" type="image/png" />
-<link rel="stylesheet" href="<%RT->Config->Get('WebPath')%>/NoAuth/css/<% RT->Config->Get( 'WebDefaultStylesheet', $session{'CurrentUser'} ) %>/main<% RT->Config->Get('DevelMode')? '' : '-squished' %>.css" type="text/css" media="all" />
+<link rel="stylesheet" href="<%RT->Config->Get('WebPath')%>/NoAuth/css/<% $style_path %>" type="text/css" media="all" />
<link rel="stylesheet" href="<%RT->Config->Get('WebPath')%>/NoAuth/css/site.css" type="text/css" media="all" />
<link rel="stylesheet" href="<%RT->Config->Get('WebPath')%>/NoAuth/css/print.css" type="text/css" media="print" />
@@ -101,6 +101,19 @@ $id =~ s|\.html$||g;
$id =~ s|index$||g
if $id ne 'index';
$id =~ s|-$||g;
+
+my $style_path;
+my $style = RT->Config->Get( 'WebDefaultStylesheet', $session{'CurrentUser'} );
+
+if ( RT->Config->Get('DevelMode') ) {
+ $style_path = "$style/main.css";
+}
+else {
+ my $key =
+ RT::Interface::Web::SquishedCSS( Name => $style )->Key;
+ $style_path = "$style/main-squished-$key.css";
+}
+
</%INIT>
<%ARGS>
diff --git a/share/html/Elements/HeaderJavascript b/share/html/Elements/HeaderJavascript
index 3f0a979..34c4538 100644
--- a/share/html/Elements/HeaderJavascript
+++ b/share/html/Elements/HeaderJavascript
@@ -55,7 +55,7 @@ $onload => undef
<script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/js/<% $jsfile %>"></script>
% } }
% else {
-<script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/js/squished.js"></script>
+<script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/js/<% $js_path %>"></script>
% }
% if ( RT->Config->Get('MessageBoxRichText', $session{'CurrentUser'}) ) {
@@ -74,3 +74,14 @@ $onload => undef
jQuery().ready(function () { ReplaceAllTextareas('<%$m->request_args->{'CKeditorEncoded'} || 0 %>') });
% }
--></script>
+
+<%INIT>
+
+my $js_path;
+if ( !RT->Config->Get('DevelMode') ) {
+ my $name = 'head';
+ my $key = RT::Interface::Web::SquishedJS( Name => $name )->Key;
+ $js_path = "squished-$name-$key.js";
+}
+
+</%INIT>
diff --git a/share/html/NoAuth/css/dhandler b/share/html/NoAuth/css/dhandler
index f1d6a62..950b1ac 100644
--- a/share/html/NoAuth/css/dhandler
+++ b/share/html/NoAuth/css/dhandler
@@ -50,28 +50,15 @@ my $squisher;
</%ONCE>
<%INIT>
my $arg = $m->dhandler_arg;
-my $path;
-if ( $arg =~ m{^(.*)-squished(\.[^\.]+)$} ) {
- $path = $m->current_comp->dir_path .'/'. $1 . $2;
+if ( $arg =~ m{(.*)/main-squished-(?:[0-9a-f]{32})\.css$} ) {
+ my $name = $1;
+ my $squished = RT::Interface::Web::SquishedCSS( Name => $name );
+ $r->header_out( 'Last-Modified' =>
+ HTTP::Date::time2str( $squished->ModifiedTime ) );
+ $m->out( $squished->Content );
}
else {
return $m->decline;
}
-$squisher = RT::CSS::Squish->new unless $squisher;
-$squisher->{'mason'} = $m;
-
-$m->out( $squisher->concatenate( $path ) );
-
-package RT::CSS::Squish;
-use CSS::Squish '0.06';
-use base qw(CSS::Squish);
-sub file_handle {
- my $self = shift;
- my $file = shift;
- my $content = $self->{'mason'}->scomp($file) || '';
- open my $fh, '<', \$content or die "$!";
- return $fh;
-}
-
</%INIT>
diff --git a/share/html/NoAuth/js/dhandler b/share/html/NoAuth/js/dhandler
index 2a16e21..3f907c1 100644
--- a/share/html/NoAuth/js/dhandler
+++ b/share/html/NoAuth/js/dhandler
@@ -51,47 +51,14 @@ my $content = '';
<%INIT>
my $arg = $m->dhandler_arg;
-my $path;
-if ( $arg =~ m{squished\.js$} ) {
- $path = $m->current_comp->dir_path;
- unless ( $content ) {
- require File::Spec;
+if ( $arg =~ m{squished-(.+)-([a-z0-9]{32})\.js$} ) {
+ my $name = $1;
+ my $squished = RT::Interface::Web::SquishedJS( Name => $name );
- for my $js ( RT->Config->Get('JSFilesInHead') ) {
- my $file = File::Spec->catfile( $path, $js );
- my $input = $m->scomp($file);
- $content .= $input;
- }
+ $r->header_out( 'Last-Modified' =>
+ HTTP::Date::time2str( $squished->ModifiedTime ) );
- my $minified;
- my $jsmin = RT->Config->Get( 'JSMinPath' );
- if ( $jsmin && -x $jsmin ) {
- my $input = $content;
- my ( $output, $error );
-
- local $SIG{'CHLD'} = 'DEFAULT';
- require IPC::Run3;
- IPC::Run3::run3( [$jsmin], \$input, \$output, \$error );
- if ( $? >> 8 ) {
- $RT::Logger->warning("failed to jsmin: $error ");
- }
- else {
- $content = $output;
- $minified = 1;
- }
- }
-
- unless ($minified) {
- eval { require JavaScript::Minifier };
- if ($@) {
- $RT::Logger->debug("can't load JavaScript::Minifier: $@");
- }
- else {
- $content = JavaScript::Minifier::minify( input => $content );
- }
- }
- }
- $m->out( $content );
+ $m->out( $squished->Content );
}
else {
return $m->decline;
commit 554a047fcc9a302ae9ddc376aa9e7d45d1905236
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Dec 15 15:20:11 2010 +0800
tiny pod fix
diff --git a/lib/RT/Squish/CSS.pm b/lib/RT/Squish/CSS.pm
index aa52d30..a405bb9 100644
--- a/lib/RT/Squish/CSS.pm
+++ b/lib/RT/Squish/CSS.pm
@@ -114,6 +114,7 @@ sub UpdateFilesMap {
update files by name, it find files in the following places:
1. if the name is a style name, add the style's corresponding main.css
+
2. if there is a files map for the name, add the corresponding files.
=cut
diff --git a/lib/RT/Squish/JS.pm b/lib/RT/Squish/JS.pm
index 73274a8..423ea2b 100644
--- a/lib/RT/Squish/JS.pm
+++ b/lib/RT/Squish/JS.pm
@@ -120,6 +120,7 @@ sub UpdateFilesMap {
update files by name, it'll try to find files in the following places:
1. if the name is 'head', add files in config item C<JSFilesInHead>.
+
2. if there is a files map for the name, add the corresponding files.
=cut
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list