Skip to content

Commit

Permalink
test - update path
Browse files Browse the repository at this point in the history
  • Loading branch information
jiyuujin committed Apr 28, 2024
1 parent c33f674 commit e16d0ca
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/web/app/composables/useLocaleCurrent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { useI18n } from '#imports'

export function useLocaleCurrent() {
const { locale } = useI18n({ useScope: 'global' })
const path = locale.value === 'ja' ? '' : `/${locale.value}`
const path = locale.value === 'ja' ? '/2024' : `/2024/${locale.value}`
return { locale, path }
}
1 change: 0 additions & 1 deletion apps/web/app/public/_redirects

This file was deleted.

2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "nuxt dev",
"build": "nuxt build && ./scripts/postbuild.sh && cp ./app/public/_redirects dist/2024/_redirects",
"build": "nuxt build && ./scripts/postbuild.sh",
"preview": "nuxt preview",
"lint": "bun run eslint && bun run htmllint",
"lint-fix": "bun run eslint-fix && bun run htmllint-fix",
Expand Down
4 changes: 2 additions & 2 deletions apps/web/scripts/postbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
# change dir structure
# ./dist/{html} -> ./dist/2024/{html}
#
if [ ! -d "./dist" ]; then
if [ ! -d "./.nuxt/dist" ]; then
echo "can not find dist"
exit 1;
fi

mkdir ./tmp
mv ./dist/* ./tmp
mv ./.nuxt/dist/* ./tmp
mkdir ./dist/2024
mv ./tmp/* ./dist/2024
rm -rf ./tmp

0 comments on commit e16d0ca

Please sign in to comment.