Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

replace backslashes to support windows filesystem #217

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions build/catalog/guides.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,9 @@ function getGuideName (filepath) {

function formatParsedGuideFilepath (srcPath, destDir) {

var relativeSrcPath = srcPath
.replace(process.cwd() + path.sep, '')
.split('/')
.filter(function (segment) {

return segment !== 'bower_components';
});
var relativeSrcPath = path.relative(process.cwd(), srcPath).split(path.sep).filter(function (segment) {
return segment !== 'bower_components';
});

// Elements in the bower_components directory
// need to have the guides segment put before the
Expand All @@ -128,4 +124,4 @@ function formatParsedGuideFilepath (srcPath, destDir) {
relativeSrcPath,
filename
);
}
}