buildSDK/less-bootstrap-compiler.php
[roojs1] / buildSDK / less-bootstrap-compiler.php
1 <?php
2
3 $cwd = getcwd();
4
5 if (array_pop(explode('/', $cwd)) !== 'roojs1') {
6     echo "this should be run in roojs1 directory...\n";
7     exit;
8 }
9
10 ini_set('include_path', 
11     dirname(__FILE__) . '/../:' .
12     dirname(__FILE__) . '/../../pear:' .
13     ini_get('include_path')
14 );
15
16 $files = array(
17     "roojs1/less/bootstrap/bootstrap.less" => array(
18         "roojs1/css-bootstrap/bootstrap.css",
19         "roojs1/css-bootstrap/bootstrap.min.css"
20     ),
21     "roojs1/less/roojs-bootstrap/roojs-bootstrap.less" => array(
22         "roojs1/css-bootstrap/roojs-bootstrap-debug.css",
23         "roojs1/css-bootstrap/roojs-bootstrap.css"
24     )
25 );
26
27 require_once 'HTML/Less.php';
28         
29 $less = new HTML_Less();
30
31 foreach ($files as $src => $file){
32
33     if(!file_exists($src)){
34         echo "{$src} does not exist...\n";
35         continue;
36     }
37     
38     echo "{$src} exist \n";
39
40 //    try {
41 //
42 //        foreach ($file as $f){
43 //            echo "Compiling - {$src} To {$f}\n";
44 //
45 //            $less->compileFile($src, $f);
46 //        }
47 //
48 //    } catch (Exception $ex) {
49 //        echo "lessphp fatal error: {$ex->getMessage()}\n";
50 //    }
51
52 }