Permalink
Browse files

ADDED - Client bundle build is now more verbose

  • Loading branch information...
1 parent 06cd69e commit 3f0bf627d671fe3e82500016fd7dd571a5325133 @glesperance committed Oct 19, 2012
Showing with 27 additions and 4 deletions.
  1. +22 −3 lib/client/client.js
  2. +5 −1 lib/loader.js
View
25 lib/client/client.js
@@ -222,7 +222,9 @@ function watchAndExportConfig(config_file_path, callback) {
json.paths = json.paths || {};
json.paths['jade-runtime'] = path.join('rocket', 'vendors', JADE_RUNTIME_FILE_NAME.substr(0, JADE_RUNTIME_FILE_NAME.length - 3));
- json.paths['now'] = '/nowjs/now';
+
+ if (!json.paths['now'])
+ json.paths['now'] = '/nowjs/now';
global.require_configuration = json;
@@ -595,7 +597,6 @@ exports.setup = function setup_client() {
if (buildClient) {
console.log('--- Building optimized client bundle. This may take several minutes.');
- console.log('');
rimraf(client_build_dir_path, function (err) {
if (err && err.code === 'ENOENT')
@@ -666,6 +667,10 @@ exports.setup = function setup_client() {
//sets up a static middleware to serve the webapp optimized tmp js folder
//as `/js`
app.use('/js', express.static(client_build_js_dir_path));
+
+ if (buildClient) {
+ console.log('\t--- JS build done.');
+ }
callback(null);
}
@@ -687,6 +692,11 @@ exports.setup = function setup_client() {
}
, function(callback) {
+
+ if (buildClient) {
+ console.log('\t--- CSS build done.');
+ }
+
//sets up a static middleware to serve the webapp optimized tmp css folder
//as `/css`
app.use('/css', express.static(client_build_css_dir_path));
@@ -701,7 +711,16 @@ exports.setup = function setup_client() {
, async.apply(watchAndExportConfig, require_js_config_path)
]
- , callback
+ , function (err) {
+ if (buildClient) {
+ if (err)
+ console.log('xxx ERROR Building client:', err);
+ else
+ console.log('--- Client Bundle Successfully Built');
+ }
+
+ callback(err);
+ }
);
}
]
View
6 lib/loader.js
@@ -89,7 +89,11 @@ exports.createServer = function createServer_rocket() {
asyncFs.mapDir(app_dir, filter, callback);
}
- , function(err) { callback(err, app); }
+ , function(err) {
+ console.log('--- Rocket App Launched.');
+ console.log('');
+ callback(err, app);
+ }
);
}

0 comments on commit 3f0bf62

Please sign in to comment.