mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Read a settings file in meeteor run
For now, do nothing with it. Constructing the framework to pass it to the running app, bit by bit
This commit is contained in:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user