@rpcbase/cli 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin.js +6 -0
- package/package.json +1 -1
- package/src/default_command.js +5 -0
package/bin.js
CHANGED
|
@@ -20,6 +20,12 @@ const args = yargs(hideBin(process.argv))
|
|
|
20
20
|
is_command = true
|
|
21
21
|
console.log("PING")
|
|
22
22
|
})
|
|
23
|
+
.option("coverage", {
|
|
24
|
+
alias: "c",
|
|
25
|
+
type: "boolean",
|
|
26
|
+
default: false,
|
|
27
|
+
description: "Adds coverage instrumentation (always disabled in production)"
|
|
28
|
+
})
|
|
23
29
|
// .option("version", {
|
|
24
30
|
// alias: "v",
|
|
25
31
|
// type: "boolean",
|
package/package.json
CHANGED
package/src/default_command.js
CHANGED
|
@@ -36,6 +36,11 @@ const default_command = async(args) => {
|
|
|
36
36
|
prefixColor = "#4DB33D"
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
// pass through coverage arg to client and server
|
|
40
|
+
if (["client", "server"].includes(cfg.type) && args.coverage) {
|
|
41
|
+
command = `${command} --coverage`
|
|
42
|
+
}
|
|
43
|
+
|
|
39
44
|
// command, name, prefixColor, env, cwd
|
|
40
45
|
return {
|
|
41
46
|
name,
|