Merge pull request #6811 from crookedneighbor/upgrade_babel

chore: upgrade babel to v6
This commit is contained in:
Blade Barringer
2016-03-04 08:36:08 -06:00
55 changed files with 132 additions and 101 deletions

View File

@@ -1,5 +1,5 @@
import {forOwn} from 'lodash';
let t = require('../translation.js');
import t from '../translation';
/* eslint-disable camelcase */
let backgrounds = {
@@ -320,4 +320,4 @@ forOwn(backgrounds, function prefillBackgroundSet (value) {
});
});
export default backgrounds;
module.exports = backgrounds;

View File

@@ -1,6 +1,6 @@
import prefill from '../prefill.js';
export default prefill({
module.exports = prefill({
0: {},
1: {},
2: {},

View File

@@ -1,6 +1,7 @@
import prefill from '../prefill.js';
import sets from '../sets.js';
export default prefill({
module.exports = prefill({
0: {},
1: {},
2: {price: 2, set: sets.baseHair1},

View File

@@ -1,7 +1,7 @@
import sets from '../sets.js';
import prefill from '../prefill.js';
export default prefill({
module.exports = prefill({
0: {},
1: {price: 2, set: sets.facialHair},
2: {price: 2, set: sets.facialHair},

View File

@@ -1,7 +1,7 @@
import sets from '../sets.js';
import prefill from '../prefill.js';
export default prefill({
module.exports = prefill({
white: {},
brown: {},
blond: {},

View File

@@ -1,6 +1,6 @@
import prefill from '../prefill.js';
export default prefill({
module.exports = prefill({
0: {},
1: {},
2: {},

View File

@@ -5,7 +5,7 @@ import color from './color.js';
import flower from './flower.js';
import mustache from './mustache.js';
export default {
module.exports = {
color,
base,
bangs,

View File

@@ -1,7 +1,7 @@
import sets from '../sets.js';
import prefill from '../prefill.js';
export default prefill({
module.exports = prefill({
0: {},
1: {price: 2, set: sets.facialHair},
2: {price: 2, set: sets.facialHair},

View File

@@ -1,6 +1,6 @@
import {forOwn} from 'lodash';
export default function prefillAppearances (obj) {
module.exports = function prefillAppearances (obj) {
forOwn(obj, function prefillAppearance (value, key) {
value.key = key;
if (!value.price) {
@@ -8,4 +8,4 @@ export default function prefillAppearances (obj) {
}
});
return obj;
}
};

View File

@@ -1,7 +1,7 @@
import t from '../translation';
import prefill from './prefill.js';
export default prefill({
module.exports = prefill({
baseHair1: {setPrice: 5, text: t('hairSet1')},
baseHair2: {setPrice: 5, text: t('hairSet2')},
facialHair: {setPrice: 5, text: t('bodyFacialHair')},

View File

@@ -1,7 +1,7 @@
import sets from './sets.js';
import prefill from './prefill.js';
export default prefill({
module.exports = prefill({
black: {},
blue: {},
green: {},

View File

@@ -1,6 +1,6 @@
import prefill from './prefill.js';
export default prefill({
module.exports = prefill({
slim: {},
broad: {},
});

View File

@@ -1,7 +1,7 @@
import prefill from './prefill.js';
import sets from './sets.js';
export default prefill({
module.exports = prefill({
/* eslint-disable quote-props */
'ddc994': {},
'f5a76e': {},

View File

@@ -1,10 +1,8 @@
let t = require('./translation.js');
import t from './translation';
let NUMBER_OF_QUESTIONS = 12;
const NUMBER_OF_QUESTIONS = 12;
let faq = {};
faq.questions = [];
export const questions = [];
for (let i = 0; i <= NUMBER_OF_QUESTIONS; i++) {
let question = {
@@ -13,12 +11,10 @@ for (let i = 0; i <= NUMBER_OF_QUESTIONS; i++) {
web: t(`webFaqAnswer${i}`),
};
faq.questions.push(question);
questions.push(question);
}
faq.stillNeedHelp = {
export const stillNeedHelp = {
ios: t('iosFaqStillNeedHelp'),
web: t('webFaqStillNeedHelp'),
};
module.exports = faq;

View File

@@ -22,4 +22,4 @@ let armor = {
armoire: armoireArmor,
};
export default armor;
module.exports = armor;

View File

@@ -9,5 +9,5 @@ let back = {
special: specialBack,
};
export default back;
module.exports = back;

View File

@@ -7,5 +7,5 @@ let body = {
special: specialBody,
};
export default body;
module.exports = body;

View File

@@ -11,4 +11,4 @@ let eyewear = {
armoire: armoireEyewear,
};
export default eyewear;
module.exports = eyewear;

View File

@@ -9,5 +9,5 @@ let headAccessory = {
mystery: mysteryHeadAccessory,
};
export default headAccessory;
module.exports = headAccessory;

View File

@@ -22,4 +22,4 @@ let head = {
armoire: armoireHead,
};
export default head;
module.exports = head;

View File

@@ -78,7 +78,7 @@ each(GEAR_TYPES, (type) => {
});
});
export default {
module.exports = {
tree: gear,
flat,
};

View File

@@ -495,4 +495,4 @@ let armoireSet = {
weapon,
};
export default armoireSet;
module.exports = armoireSet;

View File

@@ -77,4 +77,4 @@ let baseSet = {
weapon,
};
export default baseSet;
module.exports = baseSet;

View File

@@ -155,4 +155,4 @@ let healerSet = {
weapon,
};
export default healerSet;
module.exports = healerSet;

View File

@@ -385,4 +385,4 @@ let mysterySet = {
weapon,
};
export default mysterySet;
module.exports = mysterySet;

View File

@@ -167,4 +167,4 @@ let rogueSet = {
weapon,
};
export default rogueSet;
module.exports = rogueSet;

View File

@@ -1534,4 +1534,4 @@ let specialSet = {
weapon,
};
export default specialSet;
module.exports = specialSet;

View File

@@ -90,4 +90,4 @@ let backerSet = {
weaponSpecial3,
};
export default backerSet;
module.exports = backerSet;

View File

@@ -76,4 +76,4 @@ let contributorSet = {
weaponSpecialCritical,
};
export default contributorSet;
module.exports = contributorSet;

View File

@@ -59,4 +59,4 @@ let wonderconSet = {
eyewearSpecialWonderconBlack,
};
export default wonderconSet;
module.exports = wonderconSet;

View File

@@ -152,4 +152,4 @@ let warriorSet = {
weapon,
};
export default warriorSet;
module.exports = warriorSet;

View File

@@ -138,4 +138,4 @@ let wizardSet = {
weapon,
};
export default wizardSet;
module.exports = wizardSet;

View File

@@ -26,4 +26,4 @@ let shield = {
armoire: armoireShield,
};
export default shield;
module.exports = shield;

View File

@@ -22,4 +22,4 @@ let weapon = {
armoire: armoireWeapon,
};
export default weapon;
module.exports = weapon;

View File

@@ -1,12 +1,6 @@
var _, api, calculateBonus, diminishingReturns, moment, t;
api = module.exports;
_ = require('lodash');
moment = require('moment');
t = require('./translation.js');
import _ from 'lodash';
import moment from 'moment';
import t from './translation';
import {
CLASSES,
@@ -16,6 +10,8 @@ import {
USER_CAN_OWN_QUEST_CATEGORIES,
} from './constants';
let api = module.exports;
import mysterySets from './mystery-sets';
import gear from './gear';
@@ -23,6 +19,7 @@ import gear from './gear';
import appearances from './appearance';
import backgrounds from './appearance/backgrounds.js'
import spells from './spells';
import faq from './faq';
api.mystery = mysterySets;
@@ -32,8 +29,8 @@ api.gear = gear;
api.spells = spells;
/*
Time Traveler Store, mystery sets need their items mapped in
*/
Time Traveler Store, mystery sets need their items mapped in
*/
_.each(api.mystery, function(v, k) {
return v.items = _.where(api.gear.flat, {
@@ -55,10 +52,10 @@ api.timeTravelerStore = function(owned) {
/*
---------------------------------------------------------------
Unique Rewards: Potion and Armoire
---------------------------------------------------------------
*/
---------------------------------------------------------------
Unique Rewards: Potion and Armoire
---------------------------------------------------------------
*/
api.potion = {
type: 'potion',
@@ -89,7 +86,7 @@ api.armoire = {
---------------------------------------------------------------
Classes
---------------------------------------------------------------
*/
*/
api.classes = CLASSES;
@@ -98,7 +95,7 @@ api.classes = CLASSES;
---------------------------------------------------------------
Gear Types
---------------------------------------------------------------
*/
*/
api.gearTypes = GEAR_TYPES;
@@ -2606,4 +2603,4 @@ api.userDefaults = {
]
};
api.faq = require('./faq.js');
api.faq = faq;

View File

@@ -1,5 +1,5 @@
import { each } from 'lodash';
let t = require('./translation.js');
import t from './translation';
let mysterySets = {
201402: {
@@ -122,4 +122,4 @@ each(mysterySets, (value, key) => {
value.text = t(`mysterySet${key}`);
});
export default mysterySets;
module.exports = mysterySets;

View File

@@ -506,4 +506,4 @@ _.each(spells, (spellClass) => {
});
});
export default spells;
module.exports = spells;

View File

@@ -1,6 +1,6 @@
import i18n from '../i18n';
export default function translator (string, vars = { a: 'a' }) {
module.exports = function translator (string, vars = { a: 'a' }) {
function func (lang) {
return i18n.t(string, vars, lang);
}
@@ -8,4 +8,4 @@ export default function translator (string, vars = { a: 'a' }) {
func.i18nLangFunc = true; // Trick to recognize this type of function
return func;
}
};