pack('/path/to/files/', 'destination')
*
*/
require_once 'Pman.php';
class Pman_Core_JsCompile extends Pman
{
var $cli = false;
function getAuth()
{
// command line only ATM
$this->cli = HTML_FlexyFramework::get()->cli;
// var_dump($this->cli);
if ($this->cli) {
return true;
}
return false;
}
function get($proj, $args)
{
if (empty($args)) {
die("missing action : eg. build or install");
}
// list of projects.
if (empty($args[1])) {
$ar = $this->gatherProjects();
echo "SELECT Component to build\n";
print_r($ar);
exit;
} else {
$ar = array($args[1]);
//$ar = $args;
//array_shift($ar);
}
switch ($args[0]) {
case 'build':
foreach($ar as $p) {
$this->build($p);
//$this->install($p);
}
break;
case 'install' : // needed for install on remote sites..
die('not yet..');
foreach($ar as $p) {
$this->install($p);
}
break;
}
exit;
}
/**
* packScript:
*
* @param {String} basedir absolute path to files
* @param {Array} list of files (ontop of basedir)
*
*
*
*/
function packScript($basedir, $files, $output_url)
{
// this outputs ';
return;
}
foreach($ofiles as $f) {
echo '';
}
}
function packCss($basedir, $files, $output_url)
{
// this outputs