|
|
@ -7,9 +7,7 @@ export const description = "Prints out the version of the tool."; |
|
|
|
export const options = []; |
|
|
|
export const options = []; |
|
|
|
|
|
|
|
|
|
|
|
export const main = async (opts) => { |
|
|
|
export const main = async (opts) => { |
|
|
|
const pkgurl = url.parse(import.meta.url); |
|
|
|
const pkgfile = new URL("../package.json", import.meta.url); |
|
|
|
const pkgpath = path.parse(pkgurl.path); |
|
|
|
|
|
|
|
const pkgfile = path.join(pkgpath.dir, "../package.json"); |
|
|
|
|
|
|
|
const info = JSON.parse(await fs.readFile(pkgfile)); |
|
|
|
const info = JSON.parse(await fs.readFile(pkgfile)); |
|
|
|
console.log(info.version); |
|
|
|
console.log(info.version); |
|
|
|
} |
|
|
|
} |
|
|
|