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..0edfd302 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);