Skip to content

Commit

Permalink
Add errors with explanation for the removed options warn and pathToMake
Browse files Browse the repository at this point in the history
  • Loading branch information
razzeee committed Aug 28, 2018
1 parent 48f29fc commit f398975
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ function compilerArgsFromOptions(options) {
if (supportedOptions.indexOf(opt) === -1) {
if (opt === "yes") {
throw new Error('node-elm-compiler received the `yes` option, but that was removed in Elm 0.19. Try re-running without passing the `yes` option.');
} else if (opt === "warn") {
throw new Error('node-elm-compiler received the `warn` option, but that was removed in Elm 0.19. Try re-running without passing the `warn` option.');
} else if (opt === "pathToMake") {
throw new Error('node-elm-compiler received the `pathToMake` option, but that was renamed to `pathToElm` in Elm 0.19. Try re-running after renaming the parameter to `pathToElm`.');
} else {
throw new Error('node-elm-compiler was given an unrecognized Elm compiler option: ' + opt);
}
Expand Down

0 comments on commit f398975

Please sign in to comment.