aboutsummaryrefslogtreecommitdiffstats
path: root/release/build/pack.php
blob: 1caa60a5f81d6b72407766f5640c8602f9ffc8b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?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);
?>