/build/build/pack.php
PHP | 20 lines | 15 code | 5 blank | 0 comment | 2 complexity | c3d114aca6e5f86e9378d6abb0e0e7de MD5 | raw file
Possible License(s): GPL-2.0
- <?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);
- ?>