Skip to content

Commit d7d791f

Browse files
authored
Fix cli
1. will work now (it used the old import before) 2. will now run for each argument separately - I made it merge them all before, but after all, basically all command line interfaces have multiple ways of making one argument with spaces/newlines. For example using `\ ` or just `""`...
1 parent 20fd79e commit d7d791f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

cli.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { yaqrcode } from "./mod.ts";
1+
import { qrcode } from "./mod.ts";
22

3-
console.log(`${Deno.args.join(" ")}:
4-
${await yaqrcode(Deno.args.join(" "))}`);
3+
if (import.meta.main) {
4+
for (let arg of Deno.args) {
5+
console.log(`
6+
${arg}:
7+
${await qrcode(arg)}`);
8+
}
9+
}

0 commit comments

Comments
 (0)