From c849f799a3343e03c5b490197932937b2908a7d6 Mon Sep 17 00:00:00 2001 From: Nicolas Van Eenaeme Date: Sun, 4 Mar 2018 21:01:11 +0100 Subject: [PATCH] added ability to pass arguments to the run command e.g.: whack run start -- --reset-cache --- index.js | 2 +- src/commands/run.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index cc6d395..71ea1db 100755 --- a/index.js +++ b/index.js @@ -26,7 +26,7 @@ yargs require('./src/commands/install') ) .command( - 'run ', + 'run [arguments...]', 'start whack server', {}, require('./src/commands/run') diff --git a/src/commands/run.js b/src/commands/run.js index 886b7eb..5949783 100644 --- a/src/commands/run.js +++ b/src/commands/run.js @@ -17,7 +17,7 @@ module.exports = function run(opts) { commandExists('rsync', (error, rsyncExists) => { if (!error && rsyncExists) { startServer(); - spawn('npm', ['run', opts.npmScript, '--', '--config', cliConfigPath], (code) => { + spawn('npm', ['run', opts.npmScript, '--', '--config', cliConfigPath].concat(opts.arguments || []), (code) => { process.exit(code); });