buildSDK/less-bootstrap-compiler.php
[roojs1] / buildSDK / less-bootstrap-compiler.php
index 02436d9..0dba4be 100644 (file)
@@ -17,12 +17,14 @@ $rootDir = dirname(__FILE__) . '/../..';
 
 $files = array(
     "{$rootDir}/roojs1/less/bootstrap/bootstrap.less" => array(
-        'directory' => "{$rootDir}/roojs1/css-bootstrap/",
-        'name' => 'bootstrap'
+        'baseDir' => "/home/edward/Downloads/css-compiled", //"{$rootDir}/roojs1/css-bootstrap",
+        'name' => 'bootstrap.css',
+        'minify' => 'bootstrap.min.css'
     ),
     "{$rootDir}/roojs1/less/roojs-bootstrap/roojs-bootstrap.less" => array(
-        'directory' => "{$rootDir}/roojs1/css-bootstrap/",
-        'name' => 'roojs-bootstrap'
+        'baseDir' => "/home/edward/Downloads/css-compiled", //"{$rootDir}/roojs1/css-bootstrap",
+        'name' => 'roojs-bootstrap-debug.css',
+        'minify' => 'roojs-bootstrap.css'
     )
 );
 
@@ -30,38 +32,39 @@ require_once 'HTML/Less.php';
         
 $less = new HTML_Less();
 
-require_once 'HTML/CSS/Minify.php';
-
-$minify = HTML_CSS_Minify();
-
-foreach ($files as $less => $file){
+foreach ($files as $src => $file){
 
-    if(!file_exists($less)){
+    if(!file_exists($src)){
         echo "{$less} does not exist...\n";
         continue;
     }
 
-    print_R($file);
-    exit;
     try {
         
-        $css = "{$file['directory']}{$file['name']}.css";
-        
-        echo "Compiling - {$less} To {$css}\n";
+        $css = "{$file['baseDir']}/{$file['name']}";
         
-        $less->compileFile($less, $css);
+        echo "Compiling - {$src} To {$css}\n";
         
-        if(!file_exists($css)){
-            echo "Compile failed?!\n";
-            continue;
-        }
+        $less->compileFile($src, $css);
         
-        
-        
-
     } catch (Exception $ex) {
         echo "lessphp fatal error: {$ex->getMessage()}\n";
     }
     
+}
 
-}
\ No newline at end of file
+require_once 'HTML/CSS/Minify.php';
+
+foreach ($files as $src => $file){
+    
+    $css = "{$file['baseDir']}/{$file['name']}";
+    
+    if(!file_exists($css)){
+        echo "{$css} does not exist...\n";
+        continue;
+    }
+    
+    $minify = new HTML_CSS_Minify();
+    
+    
+}