diff --git a/deno.json b/deno.json index 192e695..d7c092d 100644 --- a/deno.json +++ b/deno.json @@ -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" diff --git a/scripts/svg-to-png.js b/scripts/svg-to-png.js index 888dfc7..d63a903 100644 --- a/scripts/svg-to-png.js +++ b/scripts/svg-to-png.js @@ -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 ",