10 lines
248 B
TypeScript
10 lines
248 B
TypeScript
import path from 'node:path'
|
|
import fs from 'fs-extra'
|
|
import { type PackageJson } from 'type-fest'
|
|
|
|
export function getPackageInfo() {
|
|
const packageJsonPath = path.join('package.json')
|
|
|
|
return fs.readJSONSync(packageJsonPath) as PackageJson
|
|
}
|