Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
fix(docz-core): change filepath entry for windows (#31)
Browse files Browse the repository at this point in the history
* fix(docz-core): change filepath entry for windows
* fix(docz-core): change filepath on entry class for windows
  • Loading branch information
marceloavf authored and pedronauck committed Jun 16, 2018
1 parent 56eede6 commit 14bf0e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/docz-core/src/Entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ export class Entry {

private getFilepath(file: string, src: string): string {
const srcPath = path.resolve(paths.root, src)
return path.relative(srcPath, file)
const srcPathRelative = path.relative(srcPath, file)
if (process.platform === "win32") {
return srcPathRelative.split('\\').join('/')
}
return srcPathRelative
}

private slugify(filepath: string): string {
Expand Down

0 comments on commit 14bf0e2

Please sign in to comment.