From 489c6beff8e1fe2e7a426e50089fd9830f61518e Mon Sep 17 00:00:00 2001 From: Matthew Andrews Date: Tue, 16 Jun 2015 12:55:27 +0100 Subject: [PATCH 1/2] Support nbt run --harmony --- bin/next-build-tools.js | 3 ++- tasks/run.js | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/next-build-tools.js b/bin/next-build-tools.js index 7ef80d9a..5fe03c2d 100755 --- a/bin/next-build-tools.js +++ b/bin/next-build-tools.js @@ -161,7 +161,8 @@ program program .command('run') .description('Runs the local app through the router') - .option('-l, --local', 'Run the app but don\'t start the router ') + .option('-l, --local', 'Run the app but don\'t start the router') + .option('--harmony', 'Runs the local app with harmony') .action(function(opts){ run(opts).catch(exit); }); diff --git a/tasks/run.js b/tasks/run.js index baf5bf71..3a548745 100644 --- a/tasks/run.js +++ b/tasks/run.js @@ -18,7 +18,11 @@ function runLocal(opts) { return new Promise(function(resolve, reject) { var env = Object.create(process.env); env.PORT = port; - var local = spawn('nodemon', ['server/app.js', '--watch server'], { cwd: process.cwd(), env: env }); + var args = ['server/app.js', '--watch server'] + if (opts.harmony) { + args.push('--harmony'); + } + var local = spawn('nodemon', args, { cwd: process.cwd(), env: env }); local.stdout.on('data', toStdOut); local.stderr.on('data', toStdErr); From 5e8a422987c61de3dab3a6b5b993086c9df3d27e Mon Sep 17 00:00:00 2001 From: Matthew Andrews Date: Tue, 16 Jun 2015 13:10:41 +0100 Subject: [PATCH 2/2] ; --- tasks/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/run.js b/tasks/run.js index 3a548745..0edfd302 100644 --- a/tasks/run.js +++ b/tasks/run.js @@ -18,7 +18,7 @@ function runLocal(opts) { return new Promise(function(resolve, reject) { var env = Object.create(process.env); env.PORT = port; - var args = ['server/app.js', '--watch server'] + var args = ['server/app.js', '--watch server']; if (opts.harmony) { args.push('--harmony'); }