This repository was archived by the owner on Sep 12, 2019. It is now read-only.
Fix dev command when running with npm - fix #119 #170
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make defining npm scripts other than
start
possible in dev commandThe behavior was already described in #119. When using npm and defining configuring another command than
npm start
in thecommand
field the script execution fails. This is because currently the command get's inserted an additionalrun
argument when npm was detected.Exception:
I believe that it'd be better to always pass the arguments through to execution because this is what users are used to from the build section of the
netlify.toml
.- Test plan
To test this I added a
netlify.toml
file to this repo as follows.Running
$ ./bin/run dev
leads then to the exception because it's runningnpm run run version
.After my changes, the command succeeds.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
