Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
victorgarciaesgi committed Jan 4, 2024
1 parent 68f7927 commit dadcb88
Show file tree
Hide file tree
Showing 13 changed files with 497 additions and 76 deletions.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@nuxt-themes/docus": "1.15.0",
"nuxt": "3.8.2"
"nuxt": "3.9.0"
}
}
13 changes: 3 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,7 @@
"docs:dev": "cd docs && pnpm run dev",
"docs:build": "cd docs && nuxt generate",
"typecheck": "tsc --noEmit",
"release": "bumpp && npm publish && git push --follow-tags",
"test:prepare-fixtures": "nuxi prepare test/fixtures/sample-project",
"test:types-fixtures": "nuxi typecheck test/fixtures/sample-project",
"test:fixtures": "vitest run --dir test",
"test:types": "pnpm run typecheck",
"test:vue": "vue-tsc -p test/fixtures/simple/tsconfig.json --noEmit && vue-tsc -p test/fixtures/complex/tsconfig.json --noEmit",
"test": "pnpm run test:prepare-fixtures && pnpm run test:types && pnpm run test:fixtures",
"test:debug": "NUXT_ROUTER_CONFIG_NAME=$CONFIG pnpm run test:types-fixtures"
"release": "pnpm run prepack && bumpp && npm publish && git push --follow-tags"
},
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -65,15 +58,15 @@
"prettier": "^2.5.x || 3.x"
},
"dependencies": {
"@nuxt/kit": "3.8.2",
"@nuxt/kit": "3.9.0",
"chalk": "5.3.0",
"defu": "6.1.3",
"lodash-es": "4.17.21",
"log-symbols": "6.0.0",
"mkdirp": "3.0.1",
"nanoid": "5.0.4",
"pathe": "1.1.1",
"globby": "14.0.0"
"prettier": "3.1.1"
},
"devDependencies": {
"@intlify/core-base": "9.8.0",
Expand Down
1 change: 1 addition & 0 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default defineNuxtConfig({
srcDir: './src',
i18n: {
defaultLocale: 'de',
strategy: 'prefix',
// dynamicRouteParams: true,
locales: [
{
Expand Down
1 change: 1 addition & 0 deletions playground/src/pages/[lang]/post/[slug].vue
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<template><span>Foo</span></template>
8 changes: 4 additions & 4 deletions playground/src/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<template>
<div>
<button @click="navigate"> Navigate button </button>
<nuxt-link :to="{ name: 'admin-id', params: { id: 1 } }">Navigate Link</nuxt-link>
<nuxt-link :to="localePath({ name: 'admin-444', params: { 444: 1 } })">Navigate Link</nuxt-link>
<!-- Should error -->
<nuxt-link to="/foo">Navigate Link</nuxt-link>

<nuxt-link to="/admin/888?foo">Navigate Link</nuxt-link>
<nuxt-link :to="localePath('/admin/888', 'en')">Navigate </nuxt-link>

<nuxt-link :to="{ name: 'admin-id', params: { id: 1 } }">Navigate Link</nuxt-link>
<nuxt-link :to="localePath({ name: 'user' })">Navigate Link</nuxt-link>
<nuxt-layout></nuxt-layout>

Expand All @@ -32,7 +31,6 @@ import TestLink from '~/components/TestLink.vue';
const p: NuxtRoute = { name: 'admin-444', params: { '444': 1 }, hash: '1' };
definePageMeta({
name: 'foo-bar',
redirect: { name: 'admin-444', params: { '444': 1 } },
});
Expand All @@ -41,6 +39,8 @@ const router = useRouter();
const localePath = useLocalePath();
const localeRoute = useLocaleRoute();
console.log(localePath('/admin/888', 'en'));
// const route = localeRoute({ name: 'index___en', query: { foo: '1' } });
// if (route) {
// navigateTo(route.fullPath);
Expand Down
Loading

0 comments on commit dadcb88

Please sign in to comment.