Skip to content

Commit

Permalink
chore: 🔧 bump version to 0.2.2 and update CLI version display
Browse files Browse the repository at this point in the history
  • Loading branch information
nnmrts committed Jan 27, 2025
1 parent cd664e1 commit 0c90703
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pumpn/svg-to-png",
"version": "0.2.1",
"version": "0.2.2",
"exports": {
".": "./svg-to-png.js",
"./cli": "./scripts/svg-to-png.js"
Expand Down
26 changes: 2 additions & 24 deletions scripts/svg-to-png.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,16 @@ import { Command } from "@cliffy/command";
import svgToPng from "../svg-to-png.js";

const {
args,
readTextFile
args
} = Deno;

let version = "unknown";

try {
const moduleFilePath = import.meta.filename;

if (moduleFilePath === undefined) {
throw new Error("Module file path is undefined.");
}

const rootFolderPath = resolve(moduleFilePath, "..");

const configFilePath = resolve(rootFolderPath, "deno.json");

const configContent = await readTextFile(configFilePath);

({ version } = JSON.parse(configContent));
}
catch {
// do nothing
}

const {
options: {
height, input, output, width
}
} = await new Command()
.name("svg-to-png")
.version(version)
.version("0.2.2")
.description("Convert an SVG to a PNG")
.option(
"-i, --input <input:string>",
Expand Down

0 comments on commit 0c90703

Please sign in to comment.