This commit is contained in:
Chris Wanstrath 2026-03-10 10:18:54 -07:00
parent d2c24da7dc
commit 040c3a8c47

View File

@ -43,9 +43,12 @@ async function findShoutFiles(paths: string[]): Promise<string[]> {
return files.sort() return files.sort()
} }
import pkg from "../../package.json"
program program
.name("shout") .name("shout")
.description("$ shell output tester") .description("$ shell output tester")
.version(pkg.version)
program program
.command("test") .command("test")
@ -154,6 +157,13 @@ program
process.exit(failures.length > 0 ? 1 : 0) process.exit(failures.length > 0 ? 1 : 0)
}) })
program
.command("version")
.description("Print the version")
.action(() => {
console.log(pkg.version)
})
program program
.command("example") .command("example")
.description("Print an example .shout file") .description("Print an example .shout file")