PageRenderTime 67ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/build/build/pack.php

http://jquery-ui.googlecode.com/
PHP | 20 lines | 15 code | 5 blank | 0 comment | 2 complexity | c3d114aca6e5f86e9378d6abb0e0e7de MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. if ($argc >= 3) {
  3. $src = $argv[1];
  4. $out = $argv[2];
  5. } else {
  6. echo 'you must specify a source file and a result filename',"\n";
  7. echo 'example :', "\n", 'php pack.php myScript-src.js myPackedScript.js',"\n";
  8. return;
  9. }
  10. require 'class.JavaScriptPacker.php';
  11. $script = file_get_contents($src);
  12. $packer = new JavaScriptPacker($script, 'Normal', true, false);
  13. $packed = $packer->pack();
  14. file_put_contents($out, $packed);
  15. ?>