2.0.5 • Published 9 months ago
@npmversion/util v2.0.5
@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 usesprocess.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 usesprocess.cwd()
Commands
npm run dev:linting: Lint filesnpm test: Run testsnpm run test:coverage: Run tests and see coverage reports