From 1e809395127f13657fac7cff6b7fc95d324d7f1f Mon Sep 17 00:00:00 2001 From: Jack Franklin Date: Fri, 18 Nov 2016 16:48:52 +0000 Subject: [PATCH] Proxy all args through to elm-test --- bin/create-elm-app-cli.js | 0 bin/elm-app-cli.js | 11 ++++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) mode change 100644 => 100755 bin/create-elm-app-cli.js mode change 100644 => 100755 bin/elm-app-cli.js diff --git a/bin/create-elm-app-cli.js b/bin/create-elm-app-cli.js old mode 100644 new mode 100755 diff --git a/bin/elm-app-cli.js b/bin/elm-app-cli.js old mode 100644 new mode 100755 index 9f82b864..290d696f --- a/bin/elm-app-cli.js +++ b/bin/elm-app-cli.js @@ -30,9 +30,18 @@ switch (script) { break; case 'test': { + let args = []; + Object.keys(argv || {}).forEach(function(key) { + if (key !== '_' && key !== 'compiler') { + args = args.concat([`--${key}`, argv[key]]); + } + }); + + args = args.concat(['--compiler', path.normalize(executablePaths['elm-make'])]); + const cp = spawn.sync( path.resolve(__dirname, '..', 'node_modules/elm-test/bin/elm-test'), - [ '--compiler', path.normalize(executablePaths['elm-make']) ], + args, { stdio: 'inherit' } );