Skip to content

Commit

Permalink
Merge pull request #1 from doshidak/redux
Browse files Browse the repository at this point in the history
Redux + RTK Query + Hellodex
  • Loading branch information
doshidak authored Sep 1, 2022
2 parents aa14b43 + 44e0e25 commit c7bbdfa
Show file tree
Hide file tree
Showing 152 changed files with 7,054 additions and 4,453 deletions.
11 changes: 6 additions & 5 deletions .cz-config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ module.exports = {

scopes: [
{ name: 'assets' },
{ name: 'bg' }, // background script (src/background.ts)
{ name: 'comps' },
{ name: 'consts' },
{ name: 'content' }, // content script (src/content.ts)
{ name: 'main' }, // main script (src/main.ts)
{ name: 'redux' },
{ name: 'styles' },
{ name: 'types' },
{ name: 'utils' },

{ name: 'calcdex' },
{ name: 'typedex' },
{ name: 'typetip' },
{ name: 'bg' }, // background script (src/background.ts)
{ name: 'content' }, // content script (src/content.ts)
{ name: 'main' }, // main script (src/main.ts)
{ name: 'hellodex' },
],

messages: {
Expand Down
29 changes: 26 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,39 @@

DEV_HOSTNAME="localhost"
DEV_PORT=6969
DEV_HMR_ENABLED=true
# DEV_HMR_ENABLED=true

##
## uuid
##

UUID_NAMESPACE="b92890ec-ae85-4692-a4b4-e56268f8caa3"

##
## hellodex
##

HELLODEX_ENABLED=true
HELLODEX_FORUM_URL="https://www.youtube.com/watch?v=dQw4w9WgXcQ"
HELLODEX_GITHUB_URL="https://github.com/doshidak/showdex"
HELLODEX_DONATION_URL="https://www.paypal.com/donate/?hosted_button_id=ZUYJAGAVX6MBN"

##
## calcdex
##

CALCDEX_DEFAULT_GEN=8
CALCDEX_PLAYER_MAX_POKEMON=6
CALCDEX_POKEMON_MAX_LEGAL_EVS=508

##
## pkmn
##

PKMN_PRESETS_BASE_URL="https://pkmn.github.io"
PKMN_PRESETS_GENS_PATH="/smogon/data/sets"
PKMN_PRESETS_RANDOMS_PATH="/randbats/data"

##
## showdown
##
Expand All @@ -22,6 +47,4 @@ SHOWDOWN_USERS_URL="https://pokemonshowdown.com/users"
## smogon
##

SMOGON_PRESETS_URL="https://pkmn.github.io/smogon/data/sets"
SMOGON_RANDOM_PRESETS_URL="https://pkmn.github.io/randbats/data"
SMOGON_UNIVERSITY_DEX_URL="https://www.smogon.com/dex"
10 changes: 9 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@

"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
"project": "./tsconfig.json",

"babelOptions": {
"parserOpts": {
"plugins": [
"importAssertions"
]
}
}
},

"plugins": [
Expand Down
2 changes: 1 addition & 1 deletion babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[
"@babel/preset-env",
{
"debug": true,
"debug": false,
"modules": false,
"targets": {
"node": "current"
Expand Down
15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "showdex",
"version": "0.1.3",
"description": "Pokémon Showdown Chrome extension to help you drop them dracos.",
"description": "Pokémon Showdown extension that harnesses the power of parabolic calculus to strategically extract your opponents' ELO.",
"author": "Keith Choison <[email protected]>",
"license": "UNLICENSED",
"homepage": "https://github.com/doshidak/showdex",
Expand All @@ -23,8 +23,11 @@
"commit": "./node_modules/cz-customizable/standalone.js",
"cm": "yarn commit",
"cz": "yarn commit",
"dev": "node --conditions=development --experimental-specifier-resolution=node --trace-warnings -- ./scripts/dev.js",
"build": "node --conditions=production --experimental-specifier-resolution=node -- ./scripts/build.js"
"clean:dev": "yarn rimraf ./build",
"clean:prod": "yarn rimraf ./dist",
"clean": "yarn clean:dev && yarn clean:prod",
"dev": "yarn clean:dev && NODE_ENV=development node --conditions=development --experimental-specifier-resolution=node --trace-warnings -- ./scripts/dev.js",
"build": "yarn clean:prod && NODE_ENV=production node --conditions=production --experimental-specifier-resolution=node -- ./scripts/build.js"
},
"config": {
"cz-customizable": {
Expand All @@ -48,6 +51,7 @@
"@react-aria/textfield": "^3.7.0",
"@react-aria/visually-hidden": "^3.4.0",
"@react-spring/web": "^9.5.2",
"@reduxjs/toolkit": "^1.8.3",
"@smogon/calc": "^0.6.0",
"@tippyjs/react": "^4.2.6",
"@use-gesture/react": "^10.2.17",
Expand All @@ -57,10 +61,14 @@
"date-fns": "^2.29.1",
"dotenv": "^16.0.1",
"final-form": "^4.20.7",
"qs": "^6.11.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-final-form": "^6.5.9",
"react-hot-loader": "^4.13.0",
"react-hotkeys-hook": "^3.4.7",
"react-inlinesvg": "^3.0.1",
"react-redux": "^8.0.2",
"react-select": "^5.4.0",
"remove": "^0.1.5",
"slugify": "^1.6.5",
Expand Down Expand Up @@ -107,6 +115,7 @@
"html-webpack-plugin": "^5.5.0",
"postcss": "^8.4.16",
"postcss-loader": "^7.0.1",
"rimraf": "^3.0.2",
"sass": "^1.54.3",
"sass-loader": "^13.0.2",
"source-map-loader": "^4.0.0",
Expand Down
7 changes: 4 additions & 3 deletions scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import webpack from 'webpack';
import { config } from '../webpack.config';

// note: this doesn't apply to the webpack config since it's imported before
process.env.BABEL_ENV = 'production';
process.env.NODE_ENV = 'production';

if ('chromeExtension' in config) {
delete config.chromeExtension;
}
// if ('chromeExtension' in config) {
// delete config.chromeExtension;
// }

config.mode = 'production';

Expand Down
4 changes: 4 additions & 0 deletions src/assets/icons/github-face.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/assets/icons/paypal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/showdex-1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icons/showdex-128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icons/showdex-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/showdex-2048.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icons/showdex-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/showdex-256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icons/showdex-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icons/showdex-48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/showdex-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c7bbdfa

Please sign in to comment.