Skip to content

Commit 30b71be

Browse files
committed
feat: update cli options for roman method selecting
1 parent e18ccb9 commit 30b71be

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/cli.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ program
3434
"Output compiled code or executing result to file"
3535
)
3636
.option("-r, --render", "Outputs renderings")
37-
.option("--roman", "Romanize identifiers")
37+
.option(
38+
"--roman [method]",
39+
'Romanize identifiers. The method can be "pinyin", "baxter" or "unicode"'
40+
)
3841
.option("--log <file>", "Save log to file")
3942
.option("--title <title>", "Override title in rendering")
4043
.helpOption("-h, --help", "Display help");
@@ -91,6 +94,10 @@ function preprocess() {
9194
else if (program.render) program.output = `${base}.svg`;
9295
else program.output = `${base}.log`;
9396
}
97+
98+
if (program.roman == true) {
99+
program.roman = "pinyin";
100+
}
94101
}
95102

96103
function getCompiled() {

0 commit comments

Comments
 (0)