Skip to content

Commit

Permalink
Make sure that broken syntax blows up in Travis
Browse files Browse the repository at this point in the history
Will prevent issues like this from happening again:

- graphql#304
- graphql#305

Note that we fail loudly in `build` but not in `watch` (where we want to
give the user a chance to correct their error).

Tested by manually adding and removing syntax errors when doing `npm run
build` and `npm run watch`.
  • Loading branch information
wincent committed May 1, 2017
1 parent 2bc4a01 commit 157c7ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resources/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ async function build(filter) {
}

if (require.main === module) {
build().catch(error => console.error(error.stack || error));
build().catch(error => {
console.error(error.stack || error)
process.exit(1);
});
}

0 comments on commit 157c7ed

Please sign in to comment.