Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: cleanup #75

Merged
merged 5 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
# Ignore shadcn files
.DS_Store
.github/
.husky/
.svelte-kit/
node_modules/
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

# Ignore shadcn files
src/lib/components/ui
3 changes: 0 additions & 3 deletions .github/workflows/check-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
- run: npm install -g pnpm
- run: pnpm install
- name: Check TypeScript
env:
GITHUB_ID: ${{ secrets.AUTH_GITHUB_ID }}
GITHUB_SECRET: ${{ secrets.AUTH_GITHUB_SECRET }}
run: pnpm tsc
check-prettier:
runs-on: ubuntu-latest
Expand Down
19 changes: 1 addition & 18 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,18 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# Get the commit message
commit_msg=$(cat "$1")
original_commit_msg=$(cat "$1")

# Check if the commit message contains the [CI Skip] prefix
if echo "$commit_msg" | grep -q '^\[CI Skip\]'; then
# Remove the [CI Skip] prefix
commit_msg=$(echo "$commit_msg" | sed 's/^\[CI Skip\] //')

# Write the modified commit message back to the file
echo "$commit_msg" > "$1"
fi

pnpm exec commitlint --edit "$1"
echo "$original_commit_msg" > "$1"
pnpm exec commitlint --edit "$1"
Empty file removed .npmrc
Empty file.
17 changes: 13 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
.DS_Store
.github/
.husky/
.svelte-kit/
node_modules/
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Contributing

1. [Fork the repository](https://help.github.com/articles/fork-a-repo/)
2. Install dependencies (pnpm install)
3. Create your feature branch (git checkout -b my-new-feature)
4. Commit your changes (git commit -am 'Added some feature')
5. Push to the branch (git push origin my-new-feature)
6. [Create new Pull Request](https://help.github.com/articles/creating-a-pull-request/)

## Code Style

We use eslint, prettier and svelte-check to maintain code style and best practices. Please make sure your PR adheres to
the guides by running: `npm run lint`

## Commit messages

Commit messages should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) guidelines
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# Dval.in
# Dvalin - Frontend

## This is dval.in, successor and better version of paimon.moe, and is the one site for all Genshin Impact Guides and Help. Character, Info, Weapons, Wishes, Guides, and more in one spot.
### How to use

### REQUIRED - Commit Messages: Use the Conventional Commits (https://www.conventionalcommits.org/en/v1.0.0/)
#### Requirements:

### Development Guide
- [Node 20](https://nodejs.org/)
- [pnpm](https://pnpm.io/)
- [dvalin-backend](https://github.com/dval-in/dvalin-backend)

1. Clone the repository
2. Do `pnpm install` to install the dependencies and git hooks (MUST DO)
3. Do `pnpm run dev` to start the development server
#### Steps:

1. [Clone the repository](https://docs.github.com/articles/cloning-a-repository)
2. Install dependencies (`pnpm install`)
3. Run frontend (`pnpm run dev`)

### Contributing

See [CONTRIBUTING.md](https://github.com/dval.in/dvalin-frontend/blob/master/CONTRIBUTING.md)
62 changes: 28 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,39 @@
"name": "dvalin",
"version": "0.0.1",
"private": true,
"type": "module",
"description": "This is dval.in, successor and better version of paimon.moe, and is the one site for all Genshin Impact Guides and Help. Character, Info, Weapons, Wishes, Guides, and more in one spot.",
"scripts": {
"preinstall": "node -e \"if(process.env.npm_execpath.indexOf('pnpm') === -1) throw new Error('You must use PNPM to install')\"",
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"prepare": "husky",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"generate-pwa-assets": "pwa-assets-generator"
},
"dependencies": {
"@internationalized/date": "^3.5.2",
"@mdi/js": "^7.4.47",
"bits-ui": "^0.12.0",
"clsx": "^2.1.0",
"cmdk-sv": "^0.0.13",
"d3-scale": "^4.0.2",
"d3-shape": "^3.2.0",
"formsnap": "^0.4.2",
"i18next": "^23.10.1",
"layerchart": "^0.34.0",
"lucide-svelte": "^0.303.0",
"mode-watcher": "^0.2.1",
"svelte-i18next": "^2.2.2",
"svelte-persisted-store": "^0.8.0",
"svelte-sonner": "^0.3.18",
"svelte-ux": "^0.60.6",
"sveltekit-superforms": "^1.13.4",
"tailwind-merge": "^2.2.0",
"tailwind-variants": "^0.1.19",
"tw-colors": "^3.3.1",
"zod": "^3.22.4"
},
"devDependencies": {
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
Expand Down Expand Up @@ -44,38 +65,11 @@
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3",
"vite-plugin-pwa": "^0.19.7",
"wrangler": "^3.23.0"
},
"type": "module",
"dependencies": {
"@auth/core": "^0.21.0",
"@auth/sveltekit": "^0.7.0",
"@internationalized/date": "^3.5.2",
"@mdi/js": "^7.4.47",
"bits-ui": "^0.12.0",
"clsx": "^2.1.0",
"cmdk-sv": "^0.0.13",
"d3-scale": "^4.0.2",
"d3-shape": "^3.2.0",
"formsnap": "^0.4.2",
"i18next": "^23.10.1",
"layerchart": "^0.34.0",
"lucide-svelte": "^0.303.0",
"mode-watcher": "^0.2.1",
"svelte-i18next": "^2.2.2",
"svelte-persisted-store": "^0.8.0",
"svelte-sonner": "^0.3.18",
"svelte-ux": "^0.60.6",
"sveltekit-superforms": "^1.13.4",
"tailwind-merge": "^2.2.0",
"tailwind-variants": "^0.1.19",
"tw-colors": "^3.3.1",
"zod": "^3.22.4"
"vite-plugin-pwa": "^0.19.7"
},
"engines": {
"pnpm": ">= 8",
"npm": "please-use-pnpm",
"yarn": "please-use-pnpm"
},
"description": "This is dval.in, successor and better version of paimon.moe, and is the one site for all Genshin Impact Guides and Help. Character, Info, Weapons, Wishes, Guides, and more in one spot."
}
}
Loading