Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Documentation build on Windows #51

Merged
merged 3 commits into from Sep 22, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/build-typedoc.js
@@ -1,5 +1,5 @@
const { spawn } = require("child_process");
const { join, resolve, sep } = require("path");
const { join, resolve } = require("path");
const { readFile, writeFile } = require("fs");
const _ = require("lodash");
const OUTPUT = join(process.cwd(), "docs", "src", `typedoc.json`);
Expand All @@ -13,7 +13,7 @@ const md = new MarkdownIt();
(function generateTypeDoc() {
return new Promise((resolve, reject) => {
const typedoc = spawn(
"typedoc",
"typedoc.cmd",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause a failure on Mac OS and Linux since the command doesn't have .cmd in it. Looks like nodejs/node-v0.x-archive#2318 might be to blame. You could try something like cross-spawn and see if that works. It should be a drop in replacement.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cross-spawn does work, I can change it to that. Another option would be to switch from spawn to exec. I'm pretty sure it will work on Windows, and can go that route if you prefer

[
"-json",
OUTPUT,
Expand Down Expand Up @@ -98,7 +98,7 @@ const md = new MarkdownIt();
* its name.
*/
return children.map(child => {
child.name = _.first(child.name.split(sep));
child.name = _.first(child.name.split("/"));
child.package = child.name;
return child;
});
Expand Down