From 7f13b4bf544accd511f99c8b9d1dc5af1fede598 Mon Sep 17 00:00:00 2001 From: Chris Trevino Date: Mon, 25 Nov 2019 11:30:07 -0800 Subject: [PATCH] build(scripts): update scripts to fail if any command fails --- scripts/build_package.sh | 3 ++- scripts/clean_package.sh | 3 ++- scripts/watch_package.sh | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/build_package.sh b/scripts/build_package.sh index 370c392caf..34d0636d5c 100755 --- a/scripts/build_package.sh +++ b/scripts/build_package.sh @@ -1,5 +1,6 @@ #!/bin/sh +set -e npx tsc -b npx babel --config-file=../../../babel.config.js lib --ignore="src/**/__tests__/**" --out-dir dist/esm & npx babel --config-file=../../../babel.config.cjs.js lib --ignore="src/**/__tests__/**" --out-dir dist/cjs & -wait \ No newline at end of file +wait diff --git a/scripts/clean_package.sh b/scripts/clean_package.sh index 142a34c6e9..76788bd1f2 100755 --- a/scripts/clean_package.sh +++ b/scripts/clean_package.sh @@ -1,2 +1,3 @@ #!/bin/sh -rimraf lib dist tsconfig.tsbuildinfo \ No newline at end of file +set -e +rimraf lib dist tsconfig.tsbuildinfo diff --git a/scripts/watch_package.sh b/scripts/watch_package.sh index 3c77fe7750..69b196718e 100755 --- a/scripts/watch_package.sh +++ b/scripts/watch_package.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e tsc -w --preserveWatchOutput& npx babel --config-file=../../../babel.config.cjs.js lib --out-dir dist/cjs -w --verbose& -npx babel --config-file=../../../babel.config.js lib --out-dir dist/esm -w --verbose \ No newline at end of file +npx babel --config-file=../../../babel.config.js lib --out-dir dist/esm -w --verbose