|
|
|
@ -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
|
|
|
|
@ -328,3 +339,7 @@ function bundleTask(opts) { |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function beep () { |
|
|
|
|
process.stdout.write('\x07') |
|
|
|
|
} |
|
|
|
|