Hi all,

This might be useful for some of you that do not have the java jre installed and are using the jQuery svn. I have been using this like:

make jquery
./lite.pl build/jquery.js build/jquery-lite.js

I hope this might be useful. Somewhere I read that there might be a full set of perl tools for doing this, pack and build. But I have finaly install java on my debian box so I can just use the standard build tools.

John, feel free to add this to svn in a contrib section or whereever or not.

-Steve
#!/usr/bin/perl -w

# Author: Stephen Woodbridge <[EMAIL PROTECTED]>
# License: Public Domain
# Simple script to process jQuery build/jquery.js and create 
build/jquery-lite.js

use strict;

my $in  = shift @ARGV || die "Usage: lite.pl <in_file> <out_file>\n";
my $out = shift @ARGV || die "Usage: lite.pl <in_file> <out_file>\n";

open(IN, $in)      || die "Failed to open $in for read: $!\n";
open(OUT, ">$out") || die "Failed to create $out : $!\n";

my $f = join('', <IN>);
close(IN);

$f =~ s/\s*\/\*\*\s*((.|\n)*?)\s*\*\/\n*/\n/gs;
$f =~ s/\n\n+/\n\n/gs;

print OUT $f;
close(OUT);
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to