-
Notifications
You must be signed in to change notification settings - Fork 0
/
arguments.js
58 lines (56 loc) · 2.04 KB
/
arguments.js
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const commandLineUsage = require("command-line-usage");
// CL args
module.exports.optionDefinitions = [
{ name: "verbose", alias: "v", type: Boolean }, // Whether we're verbose
{ name: "help", alias: "h", type: Boolean }, // A cry for help and documentation
{ name: "unified", alias: "u", type: Boolean }, // If we should replicate the directory structure
{ name: "src", type: String, multiple: true, defaultOption: true }, // List of source directories and files
{ name: "dest", alias: "d", type: String } // The output root directory
];
// Help documentation
module.exports.usage = commandLineUsage([
{
header: "scratch-convert",
content: "Converts Scratch 2 to Scratch 3 JSON representations."
},
{
header: "Options",
optionList: [
{
name: "verbose",
description: "Verbose messaging.",
alias: "v",
type: Boolean
},
{
name: "help",
description: "Display this usage guide.",
alias: "h",
type: Boolean
},
{
name: "src",
description: "List of directories and files to convert from SB2 to SB3. Directories will always be followed recursively.",
type: String,
multiple: true,
defaultOption: true,
typeLabel: "{underline file} ..."
},
{
name: "unified",
description: "Whether to save SB3 projects to a single unified directory. If not set, replicates original directory structure under the output root.",
alias: "u",
type: Boolean
},
{
name: "dest",
description: "Destination root directory for output files.",
alias: "d",
type: String
}
]
},
{
content: "Project home: {underline https://github.com/GSE-CCL/scratch-convert}"
}
]);