Skip to content

Commit b521ae5

Browse files
committed
refactor: fix more issues with docs scripts
1 parent 2178bdb commit b521ae5

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

scripts/publish/docs.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ function readFiles(directory, filelist) {
3535
filelist = readFiles(directory + file + '/', filelist);
3636
} else {
3737
const originalPath = directory + file;
38-
const newPath = outputPath + originalPath
38+
const newPath = path.join(outputPath, originalPath
3939
.replace(documentationPath + '/', '')
40-
.replace('/', '-');
41-
filelist.push({
42-
originalPath,
43-
newPath
44-
});
40+
.replace('/', '-'));
41+
42+
filelist.push({ originalPath, newPath });
4543
}
4644
});
4745
return filelist;
@@ -99,7 +97,7 @@ Promise.resolve()
9997
.then(() => console.log(`Documentation Path: ${documentationPath}`))
10098
.then(() => console.log(`Wiki path: ${outputPath}`))
10199
.then(() => console.log('Cloning...'))
102-
.then(() => execute(`git clone "https://github.com/angular/angular-cli.wiki" ${outputPath}`))
100+
.then(() => execute(`git clone "https://github.com/angular/angular-cli.wiki" "${outputPath}"`))
103101
.then(() => console.log('Copying Files...'))
104102
.then(() => createFiles())
105103
.then(() => process.chdir(outputPath))

0 commit comments

Comments
 (0)