Skip to content

Commit

Permalink
make ts files tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed Jul 5, 2024
1 parent f4df128 commit 13a6a61
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cli/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ program
program
.command("convert")
.description("Convert EasyEDA JSON to various formats")
.requiredOption("-i, --input <jlcpcbPartNumber>", "JLCPCB part number")
.option("-i, --input <jlcpcbPartNumber>", "JLCPCB part number")
.option("-o, --output <filename>", "Output filename")
.option(
"-t, --type <type>",
"Output type: soup.json, kicad_mod, raweasy.json, bettereasy.json, ts"
"Output type: soup.json, kicad_mod, raweasy.json, bettereasy.json, tsx"
)
.action(async (options) => {
let easyEdaJson
Expand All @@ -32,6 +32,8 @@ program
easyEdaJson = await fetchEasyEDAComponent(options.input)
}

if (options.type === "ts") options.type = "tsx"

if (!options.output && options.type) {
options.output = `${options.input}.${options.type}`
}
Expand Down

0 comments on commit 13a6a61

Please sign in to comment.