@mnrendra/types-package
v1.0.0
Published
package.json interface extended from the official and unofficial fields.
Downloads
20
Maintainers
Readme
@mnrendra/types-package
package.json
interface extended from the official and unofficial fields.
Install
npm i -D @mnrendra/types-package
Usage
import type { Package } from '@mnrendra/types-package'
import { readFileSync } from 'fs'
import { resolve } from 'path'
import { cwd } from 'process'
const { name, version }: Package = JSON.parse(readFileSync(resolve(cwd(), 'package.json'), 'utf-8'))
console.log(name, version)
Types
import type {
Package // `package.json` interface extended from the official and unofficial fields.
} from '@mnrendra/types-package'