@npmversion/util

2.0.5 • Public • Published

npm version install size Known Vulnerabilities license

@npmversion/util

Some utilities methods for the side packages

Usage

Method loadPackageJson

It will load the package.json file of the current context and exposes important information from the PackageJson model It allows one parameter:

  • cwd (string): optional parameter. Otherwise it uses process.cwd()

Method readFile

A simple method to load the content of a file

  • filePath (string): required parameter.

Method promisedExec

It executes the provided command in a shell

  • command (string): required parameter.
  • silent (boolean): optional parameter. If true it display in the console output the results of the command
  • cwd (string): optional parameter. Otherwise it uses process.cwd()

Commands

  • npm run dev:linting: Lint files
  • npm test: Run tests
  • npm run test:coverage: Run tests and see coverage reports

Contributing

Readme

Keywords

Package Sidebar

Install

npm i @npmversion/util

Weekly Downloads

10

Version

2.0.5

License

MIT

Unpacked Size

7.24 kB

Total Files

7

Last publish

Collaborators

  • rochejul