-
-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathgenerator.js
More file actions
19 lines (13 loc) · 637 Bytes
/
generator.js
File metadata and controls
19 lines (13 loc) · 637 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* eslint no-console: ["error", { allow: ["log", "warn", "error"] }] */
const childProcess = require("child_process");
const chalk = require("chalk");
const os = require("os");
require("./scripts/installPackages.js"); // install packages
// serve data
let command = "node ./node_modules/docsify-cli/bin/docsify serve ./docs --port 9505";
if (os.platform() === "win32") {
command = "node \"./node_modules/docsify-cli/bin/docsify\" serve ./docs --port 9505";
}
console.log(`${chalk.hex("#66d9ff")("Running Command: ")} ${command}\n`);
const docsProcess = childProcess.exec(command);
docsProcess.on("exit", () => process.exit(0));