diff --git a/client/.babelrc b/client/.babelrc deleted file mode 100644 index 56b2dd02..00000000 --- a/client/.babelrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "presets": [ - "es2015", - "react" - ], - "plugins": [ - ["transform-react-jsx", { "pragma":"preact.h" }] - ] -} \ No newline at end of file diff --git a/client/.eslintrc.js b/client/.eslintrc.js index bffe0bac..9b978302 100755 --- a/client/.eslintrc.js +++ b/client/.eslintrc.js @@ -1,7 +1,7 @@ module.exports = { - extends: [ - 'plugin:react/recommended', - ], + // extends: [ + // 'plugin:react/recommended', + // ], env: { browser: true, node: true @@ -14,10 +14,10 @@ module.exports = { 'import' ], settings: { - react: { - pragma: "preact", - version: "15.0", - }, + // react: { + // pragma: "preact", + // version: "15.0", + // }, 'import/resolver': { node: { extensions: ['.mjs', '.js', '.jsx', '.json'] diff --git a/client/package.json b/client/package.json index f2638d7c..fab710f6 100755 --- a/client/package.json +++ b/client/package.json @@ -6,7 +6,7 @@ "scripts": { "start": "parcel index.html --port 40080 --no-hmr --no-source-maps", "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" }, "author": "", @@ -22,16 +22,12 @@ "lodash": "^4.17.11", "parcel": "^1.9.7", "phaser": "^3.15.1", - "preact": "^8.3.1", - "preact-redux": "^2.0.3", "redux": "^4.0.0" }, "devDependencies": { - "babel-preset-react": "^6.24.1", "eslint": "^5.6.0", "eslint-config-airbnb-base": "^13.1.0", "eslint-plugin-import": "^2.14.0", - "eslint-plugin-react": "^7.11.1", "jest": "^18.0.0" } } diff --git a/client/src/actions.js b/client/src/actions.js new file mode 100644 index 00000000..8d942440 --- /dev/null +++ b/client/src/actions.js @@ -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, +}; diff --git a/client/src/actions.jsx b/client/src/actions.jsx deleted file mode 100644 index 1509142d..00000000 --- a/client/src/actions.jsx +++ /dev/null @@ -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 }); diff --git a/client/src/keyboard.jsx b/client/src/keyboard.js similarity index 100% rename from client/src/keyboard.jsx rename to client/src/keyboard.js diff --git a/client/src/main.jsx b/client/src/main.js similarity index 100% rename from client/src/main.jsx rename to client/src/main.js diff --git a/client/src/reducers.jsx b/client/src/reducers.js similarity index 100% rename from client/src/reducers.jsx rename to client/src/reducers.js diff --git a/client/src/socket.jsx b/client/src/socket.js similarity index 100% rename from client/src/socket.jsx rename to client/src/socket.js diff --git a/client/src/utils.jsx b/client/src/utils.js similarity index 100% rename from client/src/utils.jsx rename to client/src/utils.js