Add version info

This commit is contained in:
Anton Medvedev 2019-02-09 20:12:42 +07:00
parent 95b40b31b8
commit 07f8e6e18d

View File

@ -48,6 +48,10 @@ function main(input) {
stderr.write(usage)
process.exit(2)
}
if (args.length === 1 && (args[0] === '-v' || args[0] === '--version')) {
stderr.write(require('./package.json').version + '\n')
process.exit(2)
}
input = fs.readFileSync(args[0])
filename = path.basename(args[0])