Don't pipe mp3.js through babel, add respack fetch error

master
William Toohey 10 years ago
parent 10625e0f46
commit ccd52f5a87
  1. 1
      gulpfile.js
  2. 5
      src/js/ResourcePack.js

@ -32,7 +32,6 @@ gulp.task('css', function(){
gulp.task("mp3", function () {
return gulp.src("src/js/mp3/*.js")
.pipe(babel())
.pipe(uglify())
.pipe(concat("mp3-min.js"))
.pipe(gulp.dest("lib"));

@ -104,7 +104,7 @@ Respack.prototype.getBlob = function(url, progress) {
resolve(req.response);
};
req.onerror = function() {
reject(Error("Could not load respack at URL" + url));
reject(Error("Could not fetch respack at URL" + url));
};
req.onprogress = event => {
if (event.lengthComputable) {
@ -117,6 +117,9 @@ Respack.prototype.getBlob = function(url, progress) {
}
};
req.send();
}).catch(error => {
// Infinitely more useful than the error Same Origin gives
throw Error("Could not fetch respack at URL" + url);
});
}

Loading…
Cancel
Save