{"_id":"@anfo/vue-router-ts","_rev":"1-01d4564eda02f47de96ab87cfc131ca2","name":"@anfo/vue-router-ts","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@anfo/vue-router-ts","version":"1.0.0","author":{"name":"Anfo"},"license":"MIT","_id":"@anfo/vue-router-ts@1.0.0","maintainers":[{"name":"longjiahui","email":"longjiahui@hotmail.com"}],"dist":{"shasum":"0d95b2bcb6ff84dd8fafabf28e2b10a073609071","tarball":"https://registry.npmjs.org/@anfo/vue-router-ts/-/vue-router-ts-1.0.0.tgz","fileCount":11,"integrity":"sha512-9kUrjM4Nzshmd5XALJcbObd2jtMzbvc8nAGShR9a+GNT8IsU8S9+z5tDradEjbKzv/2QhM7Q+5sdWn6TCNUcQg==","signatures":[{"sig":"MEYCIQCF7LYE5yn3Qy+7Wgkiv2qO8Sy3NMr/bAkFxB617c5W4AIhALP8rz94yZohOKohk5tATMa4x11H5Gbvf39OvhoRic6A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8084},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.js","gitHead":"d18bf44c7232d93bb93a37ba0259b71b28598987","scripts":{"dev":"tsc-watch","lint":"tsc --noEmit","test":"NODE_ENV=test tsc-watch -P tsconfig.test.json --onSuccess \"node --experimental-require-module ./node_modules/mocha/bin/_mocha --recursive ./dist_test/**/*.spec.js\"","build":"tsc","prepublishOnly":"pnpm build"},"_npmUser":{"name":"longjiahui","email":"longjiahui@hotmail.com"},"_npmVersion":"10.5.1","description":"typesafe vue-router api","directories":{},"_nodeVersion":"22.0.0","dependencies":{"vue-router":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.4.34","cross-env":"^7.0.3","tsc-watch":"^6.2.0","typescript":"^5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/vue-router-ts_1.0.0_1721880837236_0.2658012285645557","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@anfo/vue-router-ts","version":"1.0.1","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"dev":"tsc-watch","build":"tsc","lint":"tsc --noEmit","test":"NODE_ENV=test tsc-watch -P tsconfig.test.json --onSuccess \"node --experimental-require-module ./node_modules/mocha/bin/_mocha --recursive ./dist_test/**/*.spec.js\"","prepublishOnly":"pnpm build"},"author":{"name":"Anfo"},"license":"MIT","description":"typesafe vue-router api","devDependencies":{"cross-env":"^7.0.3","tsc-watch":"^6.2.0","typescript":"^5.5.4","vue":"^3.4.34"},"dependencies":{"vue-router":"^4.4.0"},"_id":"@anfo/vue-router-ts@1.0.1","gitHead":"d18bf44c7232d93bb93a37ba0259b71b28598987","_nodeVersion":"22.0.0","_npmVersion":"10.5.1","dist":{"integrity":"sha512-wDXMKGTmxje82GZkSzwQoYUw0Ou05CxExulYKgk75CZDaukQyOBXZQJtg8wKzjkdds8SLSZJL41AsRV3Mu7wWA==","shasum":"0dd0f61eb7a5c71875ad2a6c8c2012de5a42ba72","tarball":"https://registry.npmjs.org/@anfo/vue-router-ts/-/vue-router-ts-1.0.1.tgz","fileCount":11,"unpackedSize":8103,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4uyzKbGWOUubyut+0loiymtmXaYK7pHlIdp64+7FlJQIhAJStaex5DBlRzaGjVLxn5P2xj7zCUWyfhRQtJ6yb2rtQ"}]},"_npmUser":{"name":"longjiahui","email":"longjiahui@hotmail.com"},"directories":{},"maintainers":[{"name":"longjiahui","email":"longjiahui@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-router-ts_1.0.1_1721888954978_0.34606984250405914"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-25T04:13:57.123Z","modified":"2024-07-25T06:29:15.312Z","1.0.0":"2024-07-25T04:13:57.372Z","1.0.1":"2024-07-25T06:29:15.129Z"},"author":{"name":"Anfo"},"license":"MIT","description":"typesafe vue-router api","maintainers":[{"name":"longjiahui","email":"longjiahui@hotmail.com"}],"readme":"# @anfo/vue-router-ts\n\ntypesafe vue-router api\n\n## Usages\n\n```ts\nimport { Nav } from '@anfo/vue-router-ts'\n\n\nconst pageANav = Nav<{fromB: string}>({\n    name: 'A',\n    path: '/a',\n    component: () => import('/path/to/PageA.vue'),\n})\nconst pageBNav = Nav<{fromA: string}>({\n    name: 'B',\n    path: '/b',\n    component: () => import('/path/to/PageB.vue'),\n})\n\nexport const router = \n  createRouter({\n    history: createWebHashHistory(),\n    routes: [\n      {\n        path: '/',\n        redirect: '/a',\n        component: App,\n        children: [pageA.route(), pageB.route()],\n      },\n    ],\n  })\n\n// toA\npageANav.use().to({fromB: 'hello A'})\npageBNav.use().to({fromA: 'hello B'})\n```","readmeFilename":"README.md"}