diff --git a/app/meteor/meteor.js b/app/meteor/meteor.js index 9190bf3e93..f4833a9399 100644 --- a/app/meteor/meteor.js +++ b/app/meteor/meteor.js @@ -101,6 +101,7 @@ Commands.push({ .describe('debug', 'Run in debug mode for node-inspector') .boolean('debug-brk') .describe('debug-brk', 'Run in debug mode and break on first line') + .describe('settings', 'Make the given JSON file\'s contents available in Meteor.settings') .usage( "Usage: meteor run [options]\n" + "\n" + @@ -113,15 +114,23 @@ Commands.push({ "are automatically detected and applied to the running application.\n" + "\n" + "The application's database persists between runs. It's stored under\n" + -"the .meteor directory in the root of the project.\n" -); +"the .meteor directory in the root of the project.\n"); var new_argv = opt.argv; + var settings = ""; if (argv.help) { process.stdout.write(opt.help()); process.exit(1); } + if (argv.settings) { + try { + settings = fs.readFileSync(argv.settings); + } catch (e) { + process.stdout.write("Could not file settings file {0}".format(argv.settings)); + process.exit(1); + } + } var app_dir = path.resolve(require_project("run", true)); // app or package var bundle_opts = { no_minify: !new_argv.production, symlink_dev_bundle: true};