X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=buildSDK%2Fless-bootstrap-compiler.php;h=be9fce7fadbc43b830181d8d07d1a02d21683c25;hb=a79418f2d639838995134f03eb135328a1039665;hp=1b5bd6f41f300c8dd427b2278de4f8ee048664e9;hpb=2a64e6beb4505b17bbd2640f002b121abcafbc4a;p=roojs1 diff --git a/buildSDK/less-bootstrap-compiler.php b/buildSDK/less-bootstrap-compiler.php index 1b5bd6f41f..be9fce7fad 100644 --- a/buildSDK/less-bootstrap-compiler.php +++ b/buildSDK/less-bootstrap-compiler.php @@ -2,7 +2,8 @@ $cwd = getcwd(); -if (array_pop(explode('/', $cwd)) !== 'roojs1') { +$cc = explode('/', $cwd); +if (array_pop($cc) !== 'roojs1') { echo "this should be run in roojs1 directory...\n"; exit; } @@ -23,6 +24,14 @@ $files = array( 'sourceMapRootpath' => '../less/bootstrap/', 'variables' => array("@import 'variables.less';") ), + "{$rootDir}/roojs1/less/bootstrap/bootstrap-light.less" => array( + 'baseDir' => "{$rootDir}/roojs1/css-bootstrap", + 'name' => 'bootstrap-light.css', + 'minify' => 'bootstrap-light.min.css', + 'sourceMapRootpath' => '../less/bootstrap/', + 'variables' => array("@import 'variables.less';") + ), + "{$rootDir}/roojs1/less/roojs-bootstrap/roojs-bootstrap.less" => array( 'baseDir' => "{$rootDir}/roojs1/css-bootstrap", 'name' => 'roojs-bootstrap-debug.css', @@ -48,9 +57,8 @@ foreach ($files as $src => $file){ continue; } - echo filemtime($css); - echo "\n"; - + $isLatest = true; + foreach(scandir($dir) as $f) { if (!strlen($f) || $f[0] == '.') { @@ -59,20 +67,19 @@ foreach ($files as $src => $file){ $less = "{$dir}{$f}"; - echo "{$less} : " . filemtime($less); - echo "\n"; - if(filemtime($less) > filemtime($css)){ - continue; + $isLatest = false; + break; } - + } + + if($isLatest){ echo "{$css} already up-to-date \n"; unset($files[$src]); - break; } } -exit; + require_once 'HTML/Less.php'; foreach ($files as $src => $file){