Skip to content

Commit

Permalink
Feature/transpilation (#64)
Browse files Browse the repository at this point in the history
* Code transpilation

* Adding webpack.config

* Feature: adding missing node envs

* Feature: transpiling tests

* Fix: using airbnb-base package
  • Loading branch information
wistcc authored Mar 30, 2017
1 parent 4ad7c9d commit 7f4e461
Show file tree
Hide file tree
Showing 17 changed files with 250 additions and 214 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules

dist
.vscode
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source
tests
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
language: node_js
node_js:
- "7"
- "6"
- "6"
- "5"
- "4"
17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"name": "werewolf-brain",
"version": "2.0.0-rc.2",
"description": "Werewolf game brain",
"main": "index.js",
"main": "./dist/index.js",
"scripts": {
"test": "mocha tests --recursive"
"build": "webpack",
"prepublish": "npm run build",
"test": "mocha --compilers js:babel-core/register tests --recursive"
},
"keywords": [
"werewolf"
Expand All @@ -18,14 +20,21 @@
"repository": "https://github.com/wistcc/werewolf-brain",
"license": "ISC",
"devDependencies": {
"babel-cli": "^6.24.0",
"babel-core": "^6.21.0",
"babel-loader": "^6.2.10",
"babel-preset-es2015": "^6.24.0",
"babel-register": "^6.24.0",
"eslint": "^3.14.0",
"eslint-config-airbnb": "^14.0.0",
"eslint-config-airbnb-base": "^11.1.2",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^3.0.2",
"eslint-plugin-react": "^6.9.0",
"glob": "^7.1.1",
"json-loader": "^0.5.4",
"mocha": "^3.2.0",
"should": "^11.1.2"
"should": "^11.1.2",
"webpack": "^1.14.0"
},
"dependencies": {
"assert": "^1.4.1"
Expand Down
2 changes: 1 addition & 1 deletion src/cards.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const decks = require('./decks');
const cards = require('../data/cards');
const cards = require('./data/cards');

exports.getAll = () => cards;

Expand Down
File renamed without changes.
118 changes: 59 additions & 59 deletions data/cards.json → src/data/cards.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
{
"apprentice_seer": 4,
"aura_seer": 3,
"beholder": 2,
"big_bad_wolf": -9,
"bloody_mary": 1,
"bodyguard": 3,
"bogeyman": -6,
"chupacabra": 4,
"count_dracula": -2,
"cult_leader": 1,
"cupid": -2,
"cursed": -3,
"dire_wolf": -4,
"diseased": 3,
"doppelganger": -2,
"dream_wolf": -5,
"drunk": 3,
"fortune_teller": 0,
"fruit_brute": -3,
"ghost": 2,
"hoodlum": 0,
"hunter": 3,
"insomniac": 3,
"leprechaun": 5,
"little_girl": 0,
"lone_wolf": -4,
"lycan": -1,
"mayor": 2,
"mason": 2,
"martyr": 3,
"minion": -6,
"moderator": 0,
"nostradamus": 1,
"old_hag": 1,
"old_man": 0,
"pacifist": -1,
"p_i": 3,
"priest": 3,
"prince": 3,
"sasquatch": -2,
"seer": 7,
"sorcerer": -3,
"spellcaster": 1,
"tanner": 1,
"the_count": 5,
"thing": 3,
"tough_guy": 3,
"troublemaker": 2,
"vampire": -7,
"village_idiot": 2,
"villager": 1,
"virginia_woolf": -2,
"werewolf": -6,
"wild_child": 0,
"witch": 4,
"wolf_cub": -8,
"wolf_man": -9,
"wolverine": -4
{
"apprentice_seer": 4,
"aura_seer": 3,
"beholder": 2,
"big_bad_wolf": -9,
"bloody_mary": 1,
"bodyguard": 3,
"bogeyman": -6,
"chupacabra": 4,
"count_dracula": -2,
"cult_leader": 1,
"cupid": -2,
"cursed": -3,
"dire_wolf": -4,
"diseased": 3,
"doppelganger": -2,
"dream_wolf": -5,
"drunk": 3,
"fortune_teller": 0,
"fruit_brute": -3,
"ghost": 2,
"hoodlum": 0,
"hunter": 3,
"insomniac": 3,
"leprechaun": 5,
"little_girl": 0,
"lone_wolf": -4,
"lycan": -1,
"mayor": 2,
"mason": 2,
"martyr": 3,
"minion": -6,
"moderator": 0,
"nostradamus": 1,
"old_hag": 1,
"old_man": 0,
"pacifist": -1,
"p_i": 3,
"priest": 3,
"prince": 3,
"sasquatch": -2,
"seer": 7,
"sorcerer": -3,
"spellcaster": 1,
"tanner": 1,
"the_count": 5,
"thing": 3,
"tough_guy": 3,
"troublemaker": 2,
"vampire": -7,
"village_idiot": 2,
"villager": 1,
"virginia_woolf": -2,
"werewolf": -6,
"wild_child": 0,
"witch": 4,
"wolf_cub": -8,
"wolf_man": -9,
"wolverine": -4
}
Loading

0 comments on commit 7f4e461

Please sign in to comment.