Skip to content

Commit

Permalink
feat(repo): monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
gx1285 committed Mar 5, 2024
1 parent f7864d5 commit 063609e
Show file tree
Hide file tree
Showing 41 changed files with 3,000 additions and 1,448 deletions.
9 changes: 7 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@

version: 2
updates:
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
- package-ecosystem: 'npm'
directory: '/packages/bot'
schedule:
interval: 'weekly'

- package-ecosystem: 'npm'
directory: '/packages/web'
schedule:
interval: 'weekly'
4 changes: 2 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
node-version: 18.x
- name: Install dependencies
run: |
pnpm install
pnpm bot install
- name: Run ESLint & Prettier
run: |
pnpm lint:fix
pnpm bot lint:fix
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,6 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# web
packages/web
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# aqued

v4 beta
Aqued のリポジトリです。

Bot は package/bot、Web は package/web にあります。
75 changes: 24 additions & 51 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,26 @@
{
"name": "aqued",
"version": "4.0.0-beta.0",
"description": "Multifunctional Discord Bot.",
"main": "dist/index.js",
"author": "aqued-dev",
"license": "MIT",
"type": "module",
"scripts": {
"build": "rimraf dist && swc src -d dist && prisma migrate dev --name init generate",
"start": "prisma migrate deploy --name init generate && node dist/src/index.js | pino-pretty -tc",
"dev": "pnpm build && node dist/src/index.js | pino-pretty -tc",
"lint": "eslint src --ext .ts && prettier --check .",
"lint:fix": "eslint src --ext .ts --fix && prettier --write .",
"prepare": "husky"
},
"dependencies": {
"@prisma/client": "^5.10.2",
"@types/ws": "^8.5.10",
"discord.js": "^14.14.1",
"dotenv": "^16.4.5",
"fastify": "^4.26.1",
"pino": "^8.19.0",
"pino-pretty": "^10.3.1",
"prisma": "^5.10.2",
"ws": "^8.16.0"
},
"devDependencies": {
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.2",
"@google/generative-ai": "^0.2.1",
"@swc/cli": "^0.3.10",
"@swc/core": "^1.4.2",
"@types/node": "^20.11.24",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-unicorn": "^50.0.1",
"husky": "^9.0.11",
"prettier": "^3.2.5",
"rimraf": "^5.0.5"
},
"engines": {
"node": ">=20.0.0"
},
"packageManager": "pnpm@8.15.4",
"volta": {
"node": "20.11.1",
"pnpm": "8.15.4"
}
"name": "aqued",
"version": "4.0.0",
"author": "aqued-dev",
"license": "MIT",
"private": "true",
"type": "module",
"scripts": {
"bot": "pnpm -F \"bot\"",
"web": "pnpm -F \"web\"",
"prepare": "husky"
},
"devDependencies": {
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.2",
"husky": "^9.0.11"
},
"engines": {
"node": ">=20.0.0"
},
"packageManager": "pnpm@8.15.4",
"volta": {
"node": "20.11.1",
"pnpm": "8.15.4"
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion .eslintrc.json → packages/bot/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"project": "./tsconfig.json",
"ecmaVersion": "latest"
},
"ignorePatterns": ["config.ts", "config.example.ts", "dist/*"],
"ignorePatterns": ["config.ts", "config.example.ts", "dist/*", "src/*"],
"plugins": ["@typescript-eslint", "unicorn", "deprecation"],
"root": true,
"rules": {
Expand Down
132 changes: 132 additions & 0 deletions packages/bot/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
node_modules

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
File renamed without changes.
File renamed without changes.
File renamed without changes.
48 changes: 48 additions & 0 deletions packages/bot/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# この Bot へ貢献

## パッケージマネージャー

pnpm@8.14.xを使用してください

## Node.js

20.xを使用するべきです

## Issue を作成するとき

1. その内容の Issue が既に存在していないかを確認して下さい(クローズ済みのものも)
2. 内容を書き込みます(テンプレートの場合は文字などを変更します)
3. Issue を作成します

## Pull request を作成する時

1. その内容の Pull request が既に存在していないかを確認して下さい(マージ済み、クローズ済みのものも)
2. もう実装されていないか確認して下さい
3. Fork し、コードを書いて、内容を書き込みます
4. Pull request を作成します(develop ブランチによろしくお願いいたします)

## コミットメッセージ

型(スコープ(任意)): タイトル

###

build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test<br/>
[Angular のコミット規約](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#type)

### コミットメッセージの例

- 新機能<br>
`feat(MongoDB): add 'set' method`<br>
- バグ修正

```
fix(MongoDB): Make the correct connection to MongoDB
close #32
```

<br>

## コミット

出来るだけ署名付きコミットでお願いします
21 changes: 21 additions & 0 deletions packages/bot/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 gx1285

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions packages/bot/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @aqued/bot

v4 beta
File renamed without changes.
51 changes: 51 additions & 0 deletions packages/bot/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "@aqued/bot",
"version": "4.0.0-beta.0",
"description": "Multifunctional Discord Bot.",
"main": "dist/index.js",
"author": "aqued-dev",
"license": "MIT",
"type": "module",
"scripts": {
"build": "rimraf dist && swc src -d dist && prisma migrate dev --name init generate",
"start": "prisma migrate deploy --name init generate && node dist/src/index.js | pino-pretty -tc",
"dev": "pnpm build && node dist/src/index.js | pino-pretty -tc",
"lint": "eslint src --ext .ts && prettier --check .",
"lint:fix": "eslint src --ext .ts --fix && prettier --write .",
"prepare": "husky"
},
"dependencies": {
"@prisma/client": "^5.10.2",
"@types/ws": "^8.5.10",
"discord.js": "^14.14.1",
"dotenv": "^16.4.5",
"fastify": "^4.26.1",
"pino": "^8.19.0",
"pino-pretty": "^10.3.1",
"prisma": "^5.10.2",
"ws": "^8.16.0"
},
"devDependencies": {
"@google/generative-ai": "^0.2.1",
"@swc/cli": "^0.3.10",
"@swc/core": "^1.4.2",
"@types/node": "^20.11.24",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-unicorn": "^50.0.1",
"husky": "^9.0.11",
"prettier": "^3.2.5",
"rimraf": "^5.0.5"
},
"engines": {
"node": ">=20.0.0"
},
"packageManager": "pnpm@8.15.4",
"volta": {
"node": "20.11.1",
"pnpm": "8.15.4"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 063609e

Please sign in to comment.