aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-08-09 08:46:31 +0800
committerkumavis <aaron@kumavis.me>2017-08-09 08:46:31 +0800
commit4a4736195f258c44723a87c659f6380d5dd2cfdd (patch)
tree1e97ad45c29d83836c1d37599f11b054741f23c4
parent6767430aa2121e7b115ca2d2ca630a1d04ecd0e1 (diff)
downloadtangerine-wallet-browser-4a4736195f258c44723a87c659f6380d5dd2cfdd.tar
tangerine-wallet-browser-4a4736195f258c44723a87c659f6380d5dd2cfdd.tar.gz
tangerine-wallet-browser-4a4736195f258c44723a87c659f6380d5dd2cfdd.tar.bz2
tangerine-wallet-browser-4a4736195f258c44723a87c659f6380d5dd2cfdd.tar.lz
tangerine-wallet-browser-4a4736195f258c44723a87c659f6380d5dd2cfdd.tar.xz
tangerine-wallet-browser-4a4736195f258c44723a87c659f6380d5dd2cfdd.tar.zst
tangerine-wallet-browser-4a4736195f258c44723a87c659f6380d5dd2cfdd.zip
build - fix error swallowing on dev
-rw-r--r--gulpfile.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/gulpfile.js b/gulpfile.js
index cc723704a..57de37dd9 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -306,6 +306,17 @@ function bundleTask(opts) {
return (
bundler.bundle()
+
+ // handle errors
+ .on('error', (err) => {
+ beep()
+ if (opts.watch) {
+ console.warn(err.stack)
+ } else {
+ throw err
+ }
+ })
+
// convert bundle stream to gulp vinyl stream
.pipe(source(opts.filename))
// inject variables into bundle
@@ -314,7 +325,7 @@ function bundleTask(opts) {
.pipe(buffer())
// sourcemaps
// loads map from browserify file
- .pipe(gulpif(debug, sourcemaps.init({loadMaps: true})))
+ .pipe(gulpif(debug, sourcemaps.init({ loadMaps: true })))
// writes .map file
.pipe(gulpif(debug, sourcemaps.write('./')))
// write completed bundles
@@ -328,3 +339,7 @@ function bundleTask(opts) {
)
}
}
+
+function beep () {
+ process.stdout.write('\x07')
+}