Skip to content

Commit

Permalink
Merge branch 'dev-fixups' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
n1mmy committed Apr 7, 2012
2 parents 1a503d1 + c011181 commit d1d69cc
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 23 deletions.
48 changes: 26 additions & 22 deletions app/lib/bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -613,29 +613,33 @@ _.extend(Bundle.prototype, {
exports.bundle = function (project_dir, output_path, options) {
options = options || {};

// Create a bundle, add the project
packages.flush();
var bundle = new Bundle;
var project = packages.get_for_dir(project_dir, ignore_files);
bundle.use(project);

// Include tests if requested
if (options.include_tests) {
// in the future, let use specify the driver, instead of hardcoding?
bundle.use(packages.get('test-in-browser'));
bundle.include_tests(project);
}
try {
// Create a bundle, add the project
packages.flush();
var bundle = new Bundle;
var project = packages.get_for_dir(project_dir, ignore_files);
bundle.use(project);

// Include tests if requested
if (options.include_tests) {
// in the future, let use specify the driver, instead of hardcoding?
bundle.use(packages.get('test-in-browser'));
bundle.include_tests(project);
}

// Minify, if requested
if (!options.no_minify)
bundle.minify();
// Minify, if requested
if (!options.no_minify)
bundle.minify();

// Write to disk
var dev_bundle_mode =
options.skip_dev_bundle ? "skip" : (
options.symlink_dev_bundle ? "symlink" : "copy");
bundle.write_to_directory(output_path, project_dir, dev_bundle_mode);
// Write to disk
var dev_bundle_mode =
options.skip_dev_bundle ? "skip" : (
options.symlink_dev_bundle ? "symlink" : "copy");
bundle.write_to_directory(output_path, project_dir, dev_bundle_mode);

if (bundle.errors.length)
return bundle.errors;
if (bundle.errors.length)
return bundle.errors;
} catch (err) {
return ["Exception while bundling application:\n" + (err.stack || err)];
}
};
20 changes: 19 additions & 1 deletion app/meteor/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -550,11 +550,23 @@ exports.run = function (app_dir, bundle_opts, port) {

var mongo_err_count = 0;
var mongo_err_timer;
var mongo_startup_print_timer;
var process_startup_printer;
var launch = function () {
mongo_runner.launch_mongo(
app_dir,
mongo_port,
function () { // On Mongo startup complete
// don't print mongo startup is slow warning.
if (mongo_startup_print_timer) {
clearTimeout(mongo_startup_print_timer);
mongo_startup_print_timer = null;
}
// print startup if we haven't already.
if (process_startup_printer) {
process_startup_printer();
process_startup_printer = null;
}
restart_server();
},
function (code, signal) { // On Mongo dead
Expand All @@ -581,7 +593,13 @@ exports.run = function (app_dir, bundle_opts, port) {

start_proxy(outer_port, inner_port, function () {
process.stdout.write("[[[[[ " + files.pretty_path(app_dir) + " ]]]]]\n\n");
process.stdout.write("Running on: http://localhost:" + outer_port + "/\n");

mongo_startup_print_timer = setTimeout(function () {
process.stdout.write("Initializing mongo database... this may take a moment.\n");
}, 3000);
process_startup_printer = function () {
process.stdout.write("Running on: http://localhost:" + outer_port + "/\n");
};

start_update_checks();
launch();
Expand Down

0 comments on commit d1d69cc

Please sign in to comment.