bun-git
v1.0.2
Published
## To install dependencies:
Downloads
753
Readme
bun-git
To install dependencies:
bun a bun-git
Usage:
import { z } from "zod"
import { system } from "bun-git"
const _schema = z.object({
name: z.string(),
version: z.string(),
...
})
const { version } = await system.packageJson()
console.log("version:", version) // version: 1.0.0
const short = await system.git["rev-parse"]()
console.log("short:", short) // short: 84a02ef
const full = await system.git["rev-parse"]("full")
console.log("full:", full) // full: 84a02ef02161420c1148f6f5adbf48ce248fc63a
const branch = await system.git.branch()
console.log("branch:", branch) // branch: main
This project was created using bun
in bun v1.1.30. Bun is a fast all-in-one JavaScript runtime.