Skip to content

Commit

Permalink
Updated husky hooks and added dark theme-color for PWA
Browse files Browse the repository at this point in the history
  • Loading branch information
Rerbun committed Mar 1, 2024
1 parent 73f1b8d commit 84c8cc8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .husky/post-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
git update-index -g
12 changes: 11 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
npm run format
#!/bin/sh
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
[ -z "$FILES" ] && exit 0

# Prettify all selected files
echo "$FILES" | xargs ./node_modules/.bin/prettier --ignore-unknown --write

# Add back the modified/prettified files to staging
echo "$FILES" | xargs git add

exit 0
3 changes: 2 additions & 1 deletion src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<meta charset="utf-8" />
<link rel="icon" href="/%sveltekit.assets%/favicon.svg" sizes="any" type="image/svg+xml" />
<link rel="manifest" href="/%sveltekit.assets%/manifest.json" />
<meta name="theme-color" content="#FFFFFF" />
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="black" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
Expand Down

0 comments on commit 84c8cc8

Please sign in to comment.