Skip to content

Commit

Permalink
Reorganize some code, add some stuff that I forgot
Browse files Browse the repository at this point in the history
  • Loading branch information
zumbiepig committed Jul 21, 2024
1 parent 08d655f commit 4bad12c
Show file tree
Hide file tree
Showing 42 changed files with 725 additions and 379 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ BOT_OWNER_ID="YOUR_DISCORD_ID"
# API_ADMIN_TOKEN="PUT_A_RANDOM_TOKEN_HERE" # you can generate one here -> https://www.uuidgenerator.net/version1

# external services
# IMGUR_CLIENT_ID="YOUR_IMGUR_CLIENT_ID"
# IMGUR_CLIENT_ID="YOUR_IMGUR_CLIENT_ID"
24 changes: 4 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,21 @@
name: Build

on:

push:
branches: [ main ]

pull_request:

# allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# allow the workflow to be re-used in other workflows
workflow_call:
on: [push, pull_request, workflow_dispatch, workflow_call]

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.11.0
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
- name: Build
run: npm run build

- name: Lint
run: npm run lint
153 changes: 139 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,147 @@
# npm
.DS_STORE

.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

build/
database/


# ----------------- Official GitHub Node.gitignore template ----------------- #

# 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

# secrets
# 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

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

# db
*.sqlite
objects/
snapshot*.txt
/data/
# Next.js build output
.next
out

# logs
logs/
*.log
# 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.*

# other
tests/
# --------------------- End of Node.gitignore template --------------------- #
37 changes: 0 additions & 37 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,8 @@
{
"typescript.tsdk": "node_modules/typescript/lib",

// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,

// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "format/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],

// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml"
]
}
Empty file removed assets/images/.gitkeep
Empty file.
14 changes: 7 additions & 7 deletions docker-compose.yml → compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ services:

# ==== Application ====

app:
container_name: my_bot
bot:
container_name: bot
restart: unless-stopped
build:
context: ./
dockerfile: ./.docker/app/Dockerfile
env_file:
- .env
ports:
- 4000:4000
volumes:
- ./database:/app/database
- ./logs/:/app/logs
- ./assets:/app/assets
restart: unless-stopped
env_file:
- .env
ports:
- 4000:4000
# depends_on:
# - database

Expand Down
6 changes: 3 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const antfu = require('@antfu/eslint-config').default
const pluginSimpleImportSort = require('eslint-plugin-simple-import-sort')
import antfu from '@antfu/eslint-config'
import pluginSimpleImportSort from 'eslint-plugin-simple-import-sort'

module.exports = antfu(
export default antfu(
{
stylistic: {
indent: 'tab',
Expand Down
Loading

0 comments on commit 4bad12c

Please sign in to comment.