From 9aa1255b8e88717ebedc6c0cd5d6130883695a67 Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Fri, 12 Feb 2016 14:02:05 +0100 Subject: [PATCH] move to babel6 and bypass https://phabricator.babeljs.io/T6792 --- gulpfile.js | 4 ++-- package.json | 4 +++- src/lib/portal_detector.js | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 30dd17d..818a42e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -3,8 +3,8 @@ var gulp = require('gulp'); var plumber = require('gulp-plumber'); var babel = require('gulp-babel'); var options = { - stage: 0, // Dat ES7 goodness - optional: ["runtime"] + presets: ['babel-preset-stage-0','es2015'], + plugins:['transform-runtime'] }; var sourcemaps = require('gulp-sourcemaps'); diff --git a/package.json b/package.json index 16975ba..7169cc4 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,9 @@ "url": "http://github.com/PrismarineJS/flying-squid/issues" }, "devDependencies": { - "babel": "^6.5.1", + "babel-plugin-transform-runtime": "^6.5.0", + "babel-preset-es2015": "^6.5.0", + "babel-preset-stage-0": "^6.5.0", "chai": "^3.2.0", "doctoc": "^1.0.0", "gulp": "^3.8.11", diff --git a/src/lib/portal_detector.js b/src/lib/portal_detector.js index 80e8ce9..abd5b79 100644 --- a/src/lib/portal_detector.js +++ b/src/lib/portal_detector.js @@ -62,8 +62,9 @@ async function findBorder(world,{line,direction},directionV) top=positiveOrder(top,direction); - if(direction.y!=0) - [bottom,left,right,top]=[left,bottom,top,right]; + if(direction.y!=0) { + [bottom, left, right, top] = [left, bottom, top, right]; + } [bottom,top]=directionV.y<0 ? [top,bottom] : [bottom,top]; const horDir=direction.x!=0 || directionV.x!=0 ? 'x' :'z';