Skip to content

Commit

Permalink
Merge pull request #94 from fossnsbm/development
Browse files Browse the repository at this point in the history
refactor: APP route
  • Loading branch information
yasithranusha authored May 21, 2024
2 parents 30aa2f8 + cf3cc81 commit 0fffc04
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 45 deletions.
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

0 comments on commit 0fffc04

Please sign in to comment.