Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

ADDED - Client bundle build is now more verbose

  • Loading branch information...
commit 3f0bf627d671fe3e82500016fd7dd571a5325133 1 parent 06cd69e
Gabriel Lesperance authored October 19, 2012
25  lib/client/client.js
@@ -222,7 +222,9 @@ function watchAndExportConfig(config_file_path, callback) {
222 222
       
223 223
       json.paths = json.paths || {};
224 224
       json.paths['jade-runtime'] = path.join('rocket', 'vendors', JADE_RUNTIME_FILE_NAME.substr(0, JADE_RUNTIME_FILE_NAME.length - 3));
225  
-      json.paths['now'] = '/nowjs/now';
  225
+      
  226
+      if (!json.paths['now'])
  227
+        json.paths['now'] = '/nowjs/now';
226 228
       
227 229
       global.require_configuration = json;
228 230
       
@@ -595,7 +597,6 @@ exports.setup = function setup_client() {
595 597
 
596 598
           if (buildClient) {
597 599
             console.log('--- Building optimized client bundle. This may take several minutes.');
598  
-            console.log('');
599 600
 
600 601
             rimraf(client_build_dir_path, function (err) {
601 602
               if (err && err.code === 'ENOENT')
@@ -666,6 +667,10 @@ exports.setup = function setup_client() {
666 667
                             //sets up a static middleware to serve the webapp optimized tmp js folder 
667 668
                             //as `/js`
668 669
                             app.use('/js', express.static(client_build_js_dir_path));
  670
+
  671
+                            if (buildClient) {
  672
+                              console.log('\t--- JS build done.');
  673
+                            }
669 674
                             
670 675
                             callback(null);
671 676
                           }
@@ -687,6 +692,11 @@ exports.setup = function setup_client() {
687 692
                           }
688 693
 
689 694
                         , function(callback) {
  695
+
  696
+                            if (buildClient) {
  697
+                              console.log('\t--- CSS build done.');
  698
+                            }
  699
+
690 700
                             //sets up a static middleware to serve the webapp optimized tmp css folder 
691 701
                             //as `/css`
692 702
                             app.use('/css', express.static(client_build_css_dir_path));
@@ -701,7 +711,16 @@ exports.setup = function setup_client() {
701 711
             
702 712
                 , async.apply(watchAndExportConfig, require_js_config_path)
703 713
               ]
704  
-              , callback
  714
+              , function (err) {
  715
+                  if (buildClient) {
  716
+                    if (err)
  717
+                      console.log('xxx ERROR Building client:', err);
  718
+                    else
  719
+                      console.log('--- Client Bundle Successfully Built');
  720
+                  }
  721
+
  722
+                  callback(err);
  723
+                }
705 724
             );
706 725
         }
707 726
       ]
6  lib/loader.js
@@ -89,7 +89,11 @@ exports.createServer = function createServer_rocket() {
89 89
         asyncFs.mapDir(app_dir, filter, callback);
90 90
       }
91 91
       
92  
-    , function(err) { callback(err, app); }
  92
+    , function(err) { 
  93
+        console.log('--- Rocket App Launched.');
  94
+        console.log('');
  95
+        callback(err, app); 
  96
+      }
93 97
   );
94 98
   
95 99
 }

0 notes on commit 3f0bf62

Please sign in to comment.
Something went wrong with that request. Please try again.