diff options
author | kumavis <aaron@kumavis.me> | 2017-08-09 08:46:31 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2017-08-09 08:46:31 +0800 |
commit | 4a4736195f258c44723a87c659f6380d5dd2cfdd (patch) | |
tree | 1e97ad45c29d83836c1d37599f11b054741f23c4 | |
parent | 6767430aa2121e7b115ca2d2ca630a1d04ecd0e1 (diff) | |
download | tangerine-wallet-browser-4a4736195f258c44723a87c659f6380d5dd2cfdd.tar.gz tangerine-wallet-browser-4a4736195f258c44723a87c659f6380d5dd2cfdd.tar.zst tangerine-wallet-browser-4a4736195f258c44723a87c659f6380d5dd2cfdd.zip |
build - fix error swallowing on dev
-rw-r--r-- | gulpfile.js | 17 |
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') +} |