From c23c65d386b67ca6b94da9b12c5066f88567c9d5 Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 18 Sep 2018 20:13:22 +1000 Subject: [PATCH] redux --- client/.babelrc | 9 +++ client/.eslintrc.js | 47 +++++++----- client/index.html | 78 +------------------- client/index.js | 83 +--------------------- client/package.json | 11 ++- client/src/actions.jsx | 3 + client/src/components/status.component.jsx | 6 ++ client/src/components/status.container.js | 13 ++++ client/src/main.jsx | 36 ++++++++++ client/src/reducers.jsx | 15 ++++ client/src/socket.jsx | 83 ++++++++++++++++++++++ 11 files changed, 204 insertions(+), 180 deletions(-) create mode 100644 client/.babelrc create mode 100644 client/src/actions.jsx create mode 100644 client/src/components/status.component.jsx create mode 100644 client/src/components/status.container.js create mode 100644 client/src/main.jsx create mode 100644 client/src/reducers.jsx create mode 100644 client/src/socket.jsx diff --git a/client/.babelrc b/client/.babelrc new file mode 100644 index 00000000..56b2dd02 --- /dev/null +++ b/client/.babelrc @@ -0,0 +1,9 @@ +{ + "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 dc863ba8..9b773225 100755 --- a/client/.eslintrc.js +++ b/client/.eslintrc.js @@ -1,21 +1,30 @@ module.exports = { - extends: 'airbnb-base', - rules: { - // prevents stupid complaints a la - // (req) { - // req.something = x; - // } - 'no-param-reassign': [2, { - props: false, - }], - 'no-multi-spaces': [0], - 'max-len': ['error', 120], - 'import/no-extraneous-dependencies': [0], - 'prefer-arrow-callback': [0], - 'arrow-body-style': [0], - 'no-console': [0], - // i like loops - 'no-plusplus': [0], - 'no-await-in-loop': [0], - }, + extends: 'airbnb', + env: { + "browser": true, + "node": true + }, + rules: { + // prevents stupid complaints a la + // (req) { + // req.something = x; + // } + 'no-param-reassign': [2, { props: false }], + 'no-multi-spaces': [0], + 'max-len': ['error', 120], + 'import/no-extraneous-dependencies': [0], + 'prefer-arrow-callback': [0], + 'arrow-body-style': [0], + 'no-console': [0], + // i like loops + 'no-plusplus': [0], + 'no-await-in-loop': [0], + 'indent': ['error', 4], + + // for preact + "react/react-in-jsx-scope": [0], + "react/jsx-indent": [2, 4], + "react/jsx-uses-react": 1, + "react/jsx-uses-vars": 1 + }, }; \ No newline at end of file diff --git a/client/index.html b/client/index.html index 5e29732d..10683ea8 100644 --- a/client/index.html +++ b/client/index.html @@ -1,7 +1,6 @@
- @@ -10,82 +9,7 @@ - -
- -
- -
-
-

- Welcome to Cryps -

-

- The worlds best pray to win game -

-
-
- -
- -
- -
-
- - - +