mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
build - fix error swallowing on dev
This commit is contained in:
parent
6767430aa2
commit
4a4736195f
17
gulpfile.js
17
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')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user