Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Hayao0819 committed Nov 6, 2023
2 parents 8f1edcd + 016a189 commit ec84408
Show file tree
Hide file tree
Showing 78 changed files with 1,845 additions and 733 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ node_modules
dist
pnpm-lock.yaml
Dockerfile
package.json
*.md

2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"env": {
"browser": true,
"es2021": true,
"es2023": true,
"node": true
},
"extends": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: ./devtools.sh init

- name: Build
run: pnpm run build
run: pnpm run build-chrome

- name: Compress files
uses: vimtor/[email protected]
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ node_modules
.next
pnpm-lock.yaml
Dockerfile
package.json
/README.md
/SUSHI.md
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"typescript.tsserver.experimental.enableProjectDiagnostics": true
}
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
## Gunma University Gaming Edition

**This project is looking for contributors; PR is welcome.**

![](https://img.shields.io/github/actions/workflow/status/GunmaRamens/gaming-gundai/check.yml?style=flat-square)
![](https://img.shields.io/github/release-date-pre/GunmaRamens/gaming-gundai?style=flat-square)
![](https://img.shields.io/github/license/GunmaRamens/gaming-gundai?style=flat-square)
![](https://img.shields.io/chrome-web-store/v/fifbnlkbedonackjjbegkjmekchdcfhk?style=flat-square)


関東の最も辺境の地にある緑あふれる群馬大学。

せめてウェブサービスだけでも綺羅びやかにしようではないかという、とある学部生のささやかなプロジェクト。

## Warning

This project is not accepted by Gunma University.

Please use this project at your own risk.
This project is not accepted by Gunma University. Please use this project at your own risk.

## Install

Expand Down Expand Up @@ -42,7 +41,7 @@ cd gaming-gundai
4. Build

```bash
pnpm run build
pnpm run build-chrome
```

5. Load dist directory to Chrome.
Expand Down Expand Up @@ -71,6 +70,7 @@ You can choose one of the following licenses.
- Volta
- Webpack

And elegant poem.

## Special Thanks

Expand Down
1 change: 1 addition & 0 deletions REFER.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
- [postcss\-loader \| webpack](https://webpack.js.org/loaders/postcss-loader/)
- [PostCSSをwebpackでサクッと動かせるサンプル \#CSS \- Qiita](https://qiita.com/okumurakengo/items/a10f6fa4b77b5b088cb9)
- [webpackでJS,React×JS,React×TSの開発環境を1から構築してみた](https://zenn.dev/spacemarket/articles/23e5401a074ccc#2.-react%E3%82%92%E5%B0%8E%E5%85%A5%E3%81%99%E3%82%8B)
- [JavaScript や CSS で ~/ から始まるパスをマッピングして import する方法 2020](https://zenn.dev/3846masa/articles/import-path-mapping)
42 changes: 34 additions & 8 deletions Todo.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,44 @@
## Todo

### ウェブサイト
### ゲーミング

- [ ] [mdl.media.gunma-u.ac.jp](https://mdl.media.gunma-u.ac.jp/GU/index.php)
- [ ] [www.kyomu-sys.gunma-u.ac.jp](https://www.kyomu-sys.gunma-u.ac.jp/Portal/)
- [ ] [www.media.gunma-u.ac.jp](https://www.media.gunma-u.ac.jp/)
- [ ] [www.gunma-u.ac.jp](https://www.gunma-u.ac.jp/)
- SSOログイン画面
- [x] 基本的な実装
- [ ] 見やすさの改善
- [mdl.media.gunma-u.ac.jp](https://mdl.media.gunma-u.ac.jp/GU/index.php)
- [x] 基本的な実装
- [www.kyomu-sys.gunma-u.ac.jp](https://www.kyomu-sys.gunma-u.ac.jp/Portal/)
- [x] 基本的な実装
- [www.media.gunma-u.ac.jp](https://www.media.gunma-u.ac.jp/)
- [x] 基本的な実装
- [opac.lib.gunma-u.ac.jp](https://opac.lib.gunma-u.ac.jp/opc/)
- [x] 基本的な実装
- [www.gunma-u.ac.jp](https://www.gunma-u.ac.jp/)
- [ ] 基本的な実装

### 開発
### ダークモード

- SSOログイン画面
- [ ] 基本的な実装
- [mdl.media.gunma-u.ac.jp](https://mdl.media.gunma-u.ac.jp/GU/index.php)
- [ ] 基本的な実装
- [www.kyomu-sys.gunma-u.ac.jp](https://www.kyomu-sys.gunma-u.ac.jp/Portal/)
- [ ] 基本的な実装
- [www.media.gunma-u.ac.jp](https://www.media.gunma-u.ac.jp/)
- [ ] 基本的な実装
- [opac.lib.gunma-u.ac.jp](https://opac.lib.gunma-u.ac.jp/opc/)
- [ ] 基本的な実装
- [www.gunma-u.ac.jp](https://www.gunma-u.ac.jp/)
- [ ] 基本的な実装

### その他

- [ ] [webpack-chrome-extension-reloader](https://www.npmjs.com/package/webpack-chrome-extension-reloader)でホットリロードに対応する
- [ ] SCSSで直にスタイルを書き込んだ場合に無効化できない問題を修正する
- [x] SCSSで直にスタイルを書き込んだ場合に無効化できない問題を修正する
- [ ] リロードなしで有効化/無効化できるようにする
- [ ] Reactコンポーネントを最適化する
- [ ] テストを書く
- [ ] ドキュメントを書く
- [ ] 設定を開いている間はポップアップを無効化する
- [x] 設定を開いている間はポップアップを無効化する
- [ ] ポップアップでの設定変更後に手動でリロードする必要がある問題を修正する
- [ ] 設定の初期値を変更する
3 changes: 2 additions & 1 deletion babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
}
],
"@babel/preset-react"
]
],
"plugins": ["syntax-dynamic-import"]
}
94 changes: 70 additions & 24 deletions devtools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,28 @@

set -e -u

script_path="$(cd "$(dirname "$0")" && pwd)"

print_usage() {
echo "$0 [options] [command]"
echo
echo "Commands:"
echo " init Setup environment"
echo " bump [Ver] Bump version"
echo
echo "Options:"
echo " -h, --help print this message"
echo
}

# change_json [file] [key] [value]
change_json() {
tmpjson="$(mktemp)"
cat "$1" > "$tmpjson"
jq "$2 |= \"$3\"" "$tmpjson" > "$1"
rm "$tmpjson"
}

init_command() {
echo "Setup GitHooks" >&2
git config core.hooksPath .githooks
Expand All @@ -31,8 +42,40 @@ init_command() {
pnpm install
}

bump_command() {
# Check jq
if ! which jq 2> /dev/null 1>&2; then
echo "Please install jq at first" >&2
echo "https://jqlang.github.io/jq/" >&2
exit 1
fi

# Check arguments
if [ $# -ne 1 ]; then
echo "Usage: $0 bump [Ver]" >&2
exit 1
fi

# Change package.json
echo "Bump version in package.json to $1" >&2
#pnpm version "$1" --no-git-tag-version --no-commit-hooks
change_json "$script_path/package.json" ".version" "$1"

# Change manifest.json

echo "Bump version in manifest.json to $1" >&2
for manifest in "$script_path/public/manifest_chrome.json" "$script_path/public/manifest_firefox.json"; do
change_json "$manifest" ".version" "$1"
done

echo "Format files" >&2
prettier --write "$script_path/package.json" "$script_path/public/manifest_chrome.json" "$script_path/public/manifest_firefox.json"

return 0
}

main() {
_short="" _long="" _noarg=""
_short="" _long="" _noopts="" _cmd="" _cmdargs=""
while true; do
case "${1-""}" in
"-h" | "--help")
Expand All @@ -44,33 +87,36 @@ main() {
break
;;
*)
_noarg="${_noarg-""}${1} "
_noopts="${_noopts-""}${1} "
shift 1
;;
esac
done
eval set -- "${_noarg}"
while true; do
case "${1-""}" in
"init")
init_command
shift 1
;;
"help")
print_usage
shift 1
exit 0
;;
"")
break
;;
*)
echo "Unknown option: $1" >&2
print_usage >&2
exit 1
;;
esac
done
eval set -- "${_noopts-""}"
_cmd="${1-""}"
shift 1 || true
case "${_cmd-""}" in
"init")
init_command "$@"
;;
"bump")
bump_command "$@"
;;
"help")
print_usage
exit 0
;;
"")
echo "No command specified" >&2
print_usage >&2
exit 1
;;
*)
echo "Unknown command: ${_cmd}" >&2
print_usage >&2
exit 1
;;
esac
}

main "$@"
48 changes: 30 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@
"name": "gunma-univ-gaming-edition",
"description": "The browser extension of Gunma University Gaming Edition",
"license": "MIT",
"version": "2.0.0",
"version": "2.1.0",
"scripts": {
"build": "pnpm webpack --mode production --config webpack.prod.js",
"build:dev": "pnpm webpack --mode development --config webpack.dev.js",
"watch": "pnpm webpack --mode development --watch --config webpack.dev.js",
"build": "pnpm run build-chrome",
"build:dev": "pnpm run build-chrome:dev",
"watch": "pnpm run watch-chrome",
"build-chrome": "pnpm webpack --mode production --env browser=chrome",
"build-chrome:dev": "pnpm webpack --mode development --env browser=chrome",
"watch-chrome": "pnpm webpack --mode development --watch --env browser=chrome",
"build-firefox": "pnpm webpack --mode production --env browser=firefox",
"build-firefox:dev": "pnpm webpack --mode development --env browser=firefox",
"watch-firefox": "pnpm webpack --mode development --watch --env browser=firefox",
"analyze": "pnpm run analyze-chrome",
"analyze-chrome": "pnpm run build-chrome:dev && source-map-explorer ./dist/**.js",
"analyze-firefox": "pnpm run build-firefox:dev && source-map-explorer ./dist/**.js",
"fmt": "prettier --write '**/*.{js,json,md,html,sh}'",
"lint": "prettier --check . && eslint . ",
"lint:fix": "pnpm fmt && eslint . --fix"
Expand All @@ -17,21 +26,22 @@
"@babel/preset-react": "^7.22.15",
"@babel/register": "^7.22.15",
"@tailwindcss/typography": "^0.5.10",
"@types/chrome": "^0.0.248",
"@types/node": "^20.8.9",
"@types/react": "^18.2.32",
"@types/chrome": "^0.0.249",
"@types/node": "^20.8.10",
"@types/react": "^18.2.36",
"@types/react-dom": "^18.2.14",
"@types/webpack": "^5.28.4",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"autoprefixer": "^10.4.16",
"babel-loader": "^9.1.3",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"copy-webpack-plugin": "^11.0.0",
"core-js": "^3.33.1",
"core-js": "^3.33.2",
"css-loader": "^6.8.1",
"css-minimizer-webpack-plugin": "^5.0.1",
"daisyui": "^3.9.3",
"eslint": "^8.52.0",
"daisyui": "^3.9.4",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2",
Expand All @@ -47,30 +57,32 @@
"postcss-scss": "^4.0.9",
"prettier": "^3.0.3",
"prettier-plugin-sh": "^0.13.1",
"sass": "^1.69.4",
"sass": "^1.69.5",
"sass-loader": "^13.3.2",
"source-map-explorer": "^2.5.3",
"style-loader": "^3.3.3",
"stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-prettier": "^4.0.2",
"tailwindcss": "^3.3.5",
"terser-webpack-plugin": "^5.3.9",
"ts-loader": "^9.5.0",
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.2.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-merge": "^5.10.0"
"webpack-cli": "^5.1.4"
},
"volta": {
"node": "18.18.1"
"node": "20.9.0"
},
"dependencies": {
"classnames": "^2.3.2",
"jotai": "^2.5.0",
"jotai": "^2.5.1",
"react": "^18.2.0",
"react-daisyui": "^4.1.2",
"react-dom": "^18.2.0",
"react-icons": "^4.11.0",
"react-router-dom": "^6.17.0"
"react-router-dom": "^6.18.0"
}
}
Loading

0 comments on commit ec84408

Please sign in to comment.