5 if (array_pop(explode('/', $cwd)) !== 'roojs1') {
6 echo "this should be run in roojs1 directory...\n";
10 ini_set('include_path',
11 dirname(__FILE__) . '/../:' .
12 dirname(__FILE__) . '/../../pear:' .
13 ini_get('include_path')
16 $rootDir = dirname(__FILE__) . '/../..';
19 "{$rootDir}/roojs1/less/bootstrap/bootstrap.less" => array(
20 'baseDir' => "{$rootDir}/roojs1/css-bootstrap",
21 'name' => 'bootstrap.css',
22 'minify' => 'bootstrap.min.css'
24 "{$rootDir}/roojs1/less/roojs-bootstrap/roojs-bootstrap.less" => array(
25 'baseDir' => "{$rootDir}/roojs1/css-bootstrap",
26 'name' => 'roojs-bootstrap-debug.css',
27 'minify' => 'roojs-bootstrap.css'
31 require_once 'HTML/Less.php';
33 $less = new HTML_Less();
35 //require_once 'HTML/CSS/Minify.php';
37 //$minify = new HTML_CSS_Minify();
41 foreach ($files as $less => $file){
43 if(!file_exists($less)){
44 echo "{$less} does not exist...\n";
50 $css = "{$file['baseDir']}/{$file['name']}";
52 echo "Compiling - {$less} To {$css}\n";
54 $less->compileFile($less, $css);
56 if(!file_exists($css)){
57 echo "Compile failed?!\n";
61 $minify[$file['mimify']] = $css;
63 } catch (Exception $ex) {
64 echo "lessphp fatal error: {$ex->getMessage()}\n";