forked from cloudflare/cloudflare-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevelop.js
More file actions
33 lines (31 loc) · 745 Bytes
/
develop.js
File metadata and controls
33 lines (31 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const concurrently = require("concurrently");
const { exec } = require("child_process");
const args = process.argv.slice(2);
const product = args[0];
concurrently(
[
{
command: `bash products/${product}/node_modules/cloudflare-docs-engine/bin/commands.sh develop`,
name: "GATSBY",
prefixColor: "cyan",
},
{
command: `node watch.js ${product}`,
name: "WATCH",
prefixColor: "magenta",
},
],
{
killOthers: ["failure", "success"],
}
).then(
() => {
process.exit(1);
},
async () => {
console.log(
"There was an error running Gatsby in this directory. Try doing an yarn install and yarn bootstrap in the product directory first."
);
process.exit(1);
}
);