react begone
This commit is contained in:
parent
ba56f424c4
commit
d699a9cfe8
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"presets": [
|
|
||||||
"es2015",
|
|
||||||
"react"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
["transform-react-jsx", { "pragma":"preact.h" }]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
extends: [
|
// extends: [
|
||||||
'plugin:react/recommended',
|
// 'plugin:react/recommended',
|
||||||
],
|
// ],
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
node: true
|
node: true
|
||||||
@ -14,10 +14,10 @@ module.exports = {
|
|||||||
'import'
|
'import'
|
||||||
],
|
],
|
||||||
settings: {
|
settings: {
|
||||||
react: {
|
// react: {
|
||||||
pragma: "preact",
|
// pragma: "preact",
|
||||||
version: "15.0",
|
// version: "15.0",
|
||||||
},
|
// },
|
||||||
'import/resolver': {
|
'import/resolver': {
|
||||||
node: {
|
node: {
|
||||||
extensions: ['.mjs', '.js', '.jsx', '.json']
|
extensions: ['.mjs', '.js', '.jsx', '.json']
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "parcel index.html --port 40080 --no-hmr --no-source-maps",
|
"start": "parcel index.html --port 40080 --no-hmr --no-source-maps",
|
||||||
"build": "rm -rf dist && parcel build index.html",
|
"build": "rm -rf dist && parcel build index.html",
|
||||||
"lint": "eslint --fix --ext .jsx src/",
|
"lint": "eslint --fix src/",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
@ -22,16 +22,12 @@
|
|||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"parcel": "^1.9.7",
|
"parcel": "^1.9.7",
|
||||||
"phaser": "^3.15.1",
|
"phaser": "^3.15.1",
|
||||||
"preact": "^8.3.1",
|
|
||||||
"preact-redux": "^2.0.3",
|
|
||||||
"redux": "^4.0.0"
|
"redux": "^4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-preset-react": "^6.24.1",
|
|
||||||
"eslint": "^5.6.0",
|
"eslint": "^5.6.0",
|
||||||
"eslint-config-airbnb-base": "^13.1.0",
|
"eslint-config-airbnb-base": "^13.1.0",
|
||||||
"eslint-plugin-import": "^2.14.0",
|
"eslint-plugin-import": "^2.14.0",
|
||||||
"eslint-plugin-react": "^7.11.1",
|
|
||||||
"jest": "^18.0.0"
|
"jest": "^18.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
42
client/src/actions.js
Normal file
42
client/src/actions.js
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
const SET_ACCOUNT = 'SET_ACCOUNT';
|
||||||
|
const setAccount = value => ({ type: SET_ACCOUNT, value });
|
||||||
|
|
||||||
|
const SET_CRYPS = 'SET_CRYPS';
|
||||||
|
const setCryps = value => ({ type: SET_CRYPS, value });
|
||||||
|
|
||||||
|
const SET_ITEMS = 'SET_ITEMS';
|
||||||
|
const setItems = value => ({ type: SET_ITEMS, value });
|
||||||
|
|
||||||
|
const SET_GAME = 'SET_GAME';
|
||||||
|
const setGame = value => ({ type: SET_GAME, value });
|
||||||
|
|
||||||
|
const SET_ACTIVE_ITEM = 'SET_ACTIVE_ITEM';
|
||||||
|
const setActiveItem = value => ({ type: SET_ACTIVE_ITEM, value });
|
||||||
|
|
||||||
|
const SET_ACTIVE_INCOMING = 'SET_ACTIVE_INCOMING';
|
||||||
|
const setActiveIncoming = value => ({ type: SET_ACTIVE_INCOMING, value });
|
||||||
|
|
||||||
|
const SET_ACTIVE_SKILL = 'SET_ACTIVE_SKILL';
|
||||||
|
const setActiveSkill = (crypId, skill) => ({ type: SET_ACTIVE_SKILL, value: crypId ? { crypId, skill } : null });
|
||||||
|
|
||||||
|
const SET_WS = 'SET_WS';
|
||||||
|
const setWs = value => ({ type: SET_WS, value });
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
SET_ACCOUNT,
|
||||||
|
setAccount,
|
||||||
|
SET_CRYPS,
|
||||||
|
setCryps,
|
||||||
|
SET_ITEMS,
|
||||||
|
setItems,
|
||||||
|
SET_GAME,
|
||||||
|
setGame,
|
||||||
|
SET_ACTIVE_ITEM,
|
||||||
|
setActiveItem,
|
||||||
|
SET_ACTIVE_INCOMING,
|
||||||
|
setActiveIncoming,
|
||||||
|
SET_ACTIVE_SKILL,
|
||||||
|
setActiveSkill,
|
||||||
|
SET_WS,
|
||||||
|
setWs,
|
||||||
|
};
|
||||||
@ -1,23 +0,0 @@
|
|||||||
export const SET_ACCOUNT = 'SET_ACCOUNT';
|
|
||||||
export const setAccount = value => ({ type: SET_ACCOUNT, value });
|
|
||||||
|
|
||||||
export const SET_CRYPS = 'SET_CRYPS';
|
|
||||||
export const setCryps = value => ({ type: SET_CRYPS, value });
|
|
||||||
|
|
||||||
export const SET_ITEMS = 'SET_ITEMS';
|
|
||||||
export const setItems = value => ({ type: SET_ITEMS, value });
|
|
||||||
|
|
||||||
export const SET_GAME = 'SET_GAME';
|
|
||||||
export const setGame = value => ({ type: SET_GAME, value });
|
|
||||||
|
|
||||||
export const SET_ACTIVE_ITEM = 'SET_ACTIVE_ITEM';
|
|
||||||
export const setActiveItem = value => ({ type: SET_ACTIVE_ITEM, value });
|
|
||||||
|
|
||||||
export const SET_ACTIVE_INCOMING = 'SET_ACTIVE_INCOMING';
|
|
||||||
export const setActiveIncoming = value => ({ type: SET_ACTIVE_INCOMING, value });
|
|
||||||
|
|
||||||
export const SET_ACTIVE_SKILL = 'SET_ACTIVE_SKILL';
|
|
||||||
export const setActiveSkill = (crypId, skill) => ({ type: SET_ACTIVE_SKILL, value: crypId ? { crypId, skill } : null });
|
|
||||||
|
|
||||||
export const SET_WS = 'SET_WS';
|
|
||||||
export const setWs = value => ({ type: SET_WS, value });
|
|
||||||
Loading…
x
Reference in New Issue
Block a user