@skriptfabrik/json-schema-bundler 0.1.1 → 0.2.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/README.md +5 -4
- package/json-schema-bundler-cli.js +11 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ json-schema-bundler --help
|
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
```text
|
|
24
|
-
JSON Schema Bundler
|
|
24
|
+
JSON Schema Bundler
|
|
25
25
|
|
|
26
26
|
Usage:
|
|
27
27
|
json-schema-bundler [options] <input>
|
|
@@ -30,9 +30,10 @@ Arguments:
|
|
|
30
30
|
input The path or URL of the input schema file
|
|
31
31
|
|
|
32
32
|
Options:
|
|
33
|
-
-h, --help
|
|
34
|
-
-p, --pretty
|
|
35
|
-
-s, --silent
|
|
33
|
+
-h, --help Display this help message
|
|
34
|
+
-p, --pretty Pretty print output
|
|
35
|
+
-s, --silent Silent mode
|
|
36
|
+
-v, --version Print version number
|
|
36
37
|
|
|
37
38
|
Examples:
|
|
38
39
|
Bundle all references in schema.json and print output to stdout:
|
|
@@ -11,6 +11,7 @@ const argv = minimist(process.argv.slice(2), {
|
|
|
11
11
|
h: 'help',
|
|
12
12
|
p: 'pretty',
|
|
13
13
|
s: 'silent',
|
|
14
|
+
v: 'version',
|
|
14
15
|
},
|
|
15
16
|
});
|
|
16
17
|
|
|
@@ -21,16 +22,21 @@ const colors = {
|
|
|
21
22
|
magenta: '\x1b[35m',
|
|
22
23
|
};
|
|
23
24
|
|
|
25
|
+
if (argv.v) {
|
|
26
|
+
console.log(pkg.version);
|
|
27
|
+
process.exit(0);
|
|
28
|
+
}
|
|
29
|
+
|
|
24
30
|
if (argv.h || argv._.length < 1) {
|
|
25
31
|
console.error(
|
|
26
|
-
`JSON Schema Bundler
|
|
27
|
-
pkg.version,
|
|
32
|
+
`JSON Schema Bundler\n\n${colors.yellow}Usage:${colors.end}\n %s\n\n${colors.yellow}Arguments:${colors.end}\n %s\n\n${colors.yellow}Options:${colors.end}\n %s\n\n${colors.yellow}Examples:${colors.end}\n %s`,
|
|
28
33
|
`${path.basename(process.argv[1])} [options] <input>`,
|
|
29
34
|
`${colors.green}input${colors.end} The path or URL of the input schema file`,
|
|
30
35
|
[
|
|
31
|
-
`${colors.green}-h, --help${colors.end}
|
|
32
|
-
`${colors.green}-p, --pretty${colors.end}
|
|
33
|
-
`${colors.green}-s, --silent${colors.end}
|
|
36
|
+
`${colors.green}-h, --help${colors.end} Display this help message`,
|
|
37
|
+
`${colors.green}-p, --pretty${colors.end} Pretty print output`,
|
|
38
|
+
`${colors.green}-s, --silent${colors.end} Silent mode`,
|
|
39
|
+
`${colors.green}-v, --version${colors.end} Print version number`,
|
|
34
40
|
].join('\n '),
|
|
35
41
|
[
|
|
36
42
|
[
|