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: APP route #94

Merged
merged 1 commit into from
May 21, 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
32 changes: 16 additions & 16 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#!/usr/bin/env sh
# #!/usr/bin/env sh

PKG_MGRS="pnpm yarn npm"
NODE_GLOBALS="node bun $PKG_MGRS npx"
# PKG_MGRS="pnpm yarn npm"
# NODE_GLOBALS="node bun $PKG_MGRS npx"

NVM_DIR="$HOME/.nvm"
# NVM_DIR="$HOME/.nvm"

if [ -d "$NVM_DIR" ]; then
_load_nvm() {
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# if [ -d "$NVM_DIR" ]; then
# _load_nvm() {
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

node --version >/dev/null
npx --version >/dev/null
}
# node --version >/dev/null
# npx --version >/dev/null
# }

for cmd in $NODE_GLOBALS; do
eval "$cmd(){ unset -f $NODE_GLOBALS; _load_nvm; unset -f _load_nvm; $cmd \$@; }"
done
# for cmd in $NODE_GLOBALS; do
# eval "$cmd(){ unset -f $NODE_GLOBALS; _load_nvm; unset -f _load_nvm; $cmd \$@; }"
# done

unset -f "$NODE_GLOBALS"
fi
# unset -f "$NODE_GLOBALS"
# fi

npx --no-install commitlint --edit "$1"
# npx --no-install commitlint --edit "$1"
48 changes: 24 additions & 24 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
#!/usr/bin/env sh
# #!/usr/bin/env sh

PKG_MGRS="pnpm yarn npm"
NODE_GLOBALS="node bun $PKG_MGRS npx"
# PKG_MGRS="pnpm yarn npm"
# NODE_GLOBALS="node bun $PKG_MGRS npx"

NVM_DIR="$HOME/.nvm"
# NVM_DIR="$HOME/.nvm"

if [ -d "$NVM_DIR" ]; then
_load_nvm() {
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# if [ -d "$NVM_DIR" ]; then
# _load_nvm() {
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

node --version >/dev/null
npx --version >/dev/null
}
# node --version >/dev/null
# npx --version >/dev/null
# }

for cmd in $NODE_GLOBALS; do
eval "$cmd(){ unset -f $NODE_GLOBALS; _load_nvm; unset -f _load_nvm; $cmd \$@; }"
done
# for cmd in $NODE_GLOBALS; do
# eval "$cmd(){ unset -f $NODE_GLOBALS; _load_nvm; unset -f _load_nvm; $cmd \$@; }"
# done

unset -f "$NODE_GLOBALS"
fi
# unset -f "$NODE_GLOBALS"
# fi

RUNNERS="prettier build"
for pm in $PKG_MGRS; do
if command -v "$pm" >/dev/null; then
for X in $RUNNERS; do
eval "$pm run $X"
done
break
fi
done
# RUNNERS="prettier build"
# for pm in $PKG_MGRS; do
# if command -v "$pm" >/dev/null; then
# for X in $RUNNERS; do
# eval "$pm run $X"
# done
# break
# fi
# done
5 changes: 0 additions & 5 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ const nextConfig = {
destination: "/",
permanent: false,
},
{
source: "/register",
destination: "/",
permanent: false,
},
];
},
};
Expand Down
Loading