mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
21 lines
434 B
PHP
21 lines
434 B
PHP
<?php
|
|
|
|
if ($argc >= 3) {
|
|
$src = $argv[1];
|
|
$out = $argv[2];
|
|
} else {
|
|
echo 'you must specify a source file and a result filename',"\n";
|
|
echo 'example :', "\n", 'php pack.php myScript-src.js myPackedScript.js',"\n";
|
|
return;
|
|
}
|
|
|
|
require 'class.JavaScriptPacker.php';
|
|
|
|
$script = file_get_contents($src);
|
|
|
|
$packer = new JavaScriptPacker($script, 'Normal', true, false);
|
|
$packed = $packer->pack();
|
|
|
|
file_put_contents($out, $packed);
|
|
?>
|