Skip to content

Commit

Permalink
fix: modify router path
Browse files Browse the repository at this point in the history
  • Loading branch information
BeADre committed Nov 13, 2020
1 parent 0a2cf55 commit 5451c55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/varlet-cli/src/shared/fsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function convertMobileSiteExamplePathToComponentName(
}

export function getRouterPathByPcSiteDocsPath(path: string): string {
return path.split(DOCS_DIR_NAME)[1]
return path.split(DOCS_DIR_NAME)[1].split('.')[0]
}

export async function getMobileSiteExamplePaths(): Promise<string[]> {
Expand Down Expand Up @@ -109,7 +109,7 @@ export function getPcSiteDocsPaths(): string[] {
}, {})
return Object.entries(docsDirMap).reduce((pathList: string[], pathMap) => {
pathMap[1].forEach((filename) => {
pathList.push(resolve(pathMap[0], filename))
pathList.push(slash(resolve(pathMap[0], filename)))
})
return pathList
}, [])
Expand Down

0 comments on commit 5451c55

Please sign in to comment.