Navigation Menu

Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
olistic committed Apr 7, 2016
1 parent db122d8 commit 513818d
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 29 deletions.
5 changes: 4 additions & 1 deletion .babelrc
@@ -1,3 +1,6 @@
{
"stage": 0
"presets": [
"es2015",
"stage-0"
]
}
4 changes: 0 additions & 4 deletions .eslintrc
Expand Up @@ -3,9 +3,5 @@

"env": {
"mocha": true
},

"rules": {
"id-length": [2, {"min": 2, "properties": "never", "exceptions": ["n", "x", "y", "_"]}]
}
}
4 changes: 2 additions & 2 deletions bin/warriorjs
@@ -1,6 +1,6 @@
#!/usr/bin/env node

var Runner = require('../lib/Runner');
const Runner = require('../lib/Runner').default;

var runner = new Runner(process.argv, process.stdin, process.stdout);
const runner = new Runner(process.argv, process.stdin, process.stdout);
runner.run();
35 changes: 19 additions & 16 deletions package.json
Expand Up @@ -5,9 +5,9 @@
"description": "Game written in JavaScript for learning JavaScript and artificial intelligence",
"main": "index.js",
"scripts": {
"compile": "babel src --out-dir lib",
"compile": "babel src -d lib",
"prepublish": "npm run compile",
"test": "mocha --compilers js:babel/register --ui bdd --reporter spec --recursive",
"test": "mocha --compilers js:babel-register --ui bdd --reporter spec --recursive",
"test-travis": "echo \"No ES5 tests yet\" && exit 0",
"lint": "eslint . --ext .js"
},
Expand All @@ -32,28 +32,31 @@
"interactive",
"cli"
],
"author": "Matias Olivera <m@matioli.me>",
"author": "Matias Olivera <moliverafreire@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/olistic/warriorjs/issues"
},
"homepage": "https://github.com/olistic/warriorjs",
"devDependencies": {
"babel": "^5.8.29",
"babel-eslint": "^4.1.6",
"chai": "^3.4.0",
"eslint": "^1.10.3",
"eslint-config-airbnb": "^2.0.0",
"mocha": "^2.3.3"
"babel-cli": "^6.6.5",
"babel-eslint": "^6.0.2",
"babel-preset-es2015": "^6.6.0",
"babel-preset-stage-0": "^6.5.0",
"babel-register": "^6.7.2",
"chai": "^3.5.0",
"eslint": "^2.7.0",
"eslint-config-airbnb": "^6.2.0",
"mocha": "^2.4.5"
},
"dependencies": {
"bluebird": "^3.0.5",
"chalk": "^1.1.1",
"ejs": "^2.3.4",
"fs-extra": "^0.26.2",
"glob": "^6.0.1",
"inquirer": "^0.11.0",
"bluebird": "^3.3.4",
"chalk": "^1.1.3",
"ejs": "^2.4.1",
"fs-extra": "^0.26.7",
"glob": "^7.0.3",
"inquirer": "^0.12.0",
"warriorjs-engine": "^0.4.2",
"yargs": "^3.31.0"
"yargs": "^4.4.0"
}
}
9 changes: 8 additions & 1 deletion src/Config.js
Expand Up @@ -48,7 +48,14 @@ export default class Config {
}

static reset() {
['_pathPrefix', '_skipInput', '_delay', '_inStream', '_outStream', '_practiceLevel'].forEach((prop) => {
[
'_pathPrefix',
'_skipInput',
'_delay',
'_inStream',
'_outStream',
'_practiceLevel',
].forEach((prop) => {
if (this.hasOwnProperty(prop)) {
delete this[prop];
}
Expand Down
10 changes: 5 additions & 5 deletions src/UI.js
Expand Up @@ -76,12 +76,12 @@ class UI {

static choose(itemName, items) {
return new Promise((resolve) => {
const choices = items.map((item) => {
return {
const choices = items.map(item => (
{
name: item.toString(),
value: item,
};
});
}
));

const name = 'choice';
inquirer.prompt([
Expand Down Expand Up @@ -149,7 +149,7 @@ class UI {
for (let y = 0; y < size.height; y++) {
let row = '║';
for (let x = 0; x < size.width; x++) {
const foundUnit = units.find((unit) => unit.x === x && unit.y === y); // eslint-disable-line no-loop-func
const foundUnit = units.find(unit => unit.x === x && unit.y === y);
if (foundUnit) {
row += styled ?
UI.getUnitStyle(foundUnit.type)(UI.getUnitCharacter(foundUnit.type)) :
Expand Down

0 comments on commit 513818d

Please sign in to comment.