better-npm-run attempts to execute the following command: node node_modules/react-native/local-cli/cli.js bundle --platform ios --dev false --entry-file index.ios.js --bundle-output ios/main.jsbundle -p .env.staging. The react-native cli then complains about the -p argument that it doesn't understand. The issue, of course, is that there's no way to differentiate between an argument that should be consumed by better-npm-run and arguments to be appended to the generated command.
I suggest changing the cli signature to better-npm-run [options] <script-name> [extraArgs]. Then we'll be able to easily determine which options should be consumed by bnr and which should be consumed by the generated command.
With a change like this, the following example would work:
Given a
package.json
like so (react-native project):better-npm-run attempts to execute the following command:
node node_modules/react-native/local-cli/cli.js bundle --platform ios --dev false --entry-file index.ios.js --bundle-output ios/main.jsbundle -p .env.staging
. The react-native cli then complains about the-p
argument that it doesn't understand. The issue, of course, is that there's no way to differentiate between an argument that should be consumed bybetter-npm-run
and arguments to be appended to the generated command.I suggest changing the cli signature to
better-npm-run [options] <script-name> [extraArgs]
. Then we'll be able to easily determine which options should be consumed by bnr and which should be consumed by the generated command.With a change like this, the following example would work: