1.0.0 • Published 10 months ago

@mnrendra/types-package v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@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'

License

MIT

Author

@mnrendra