interface FileOpts {
    npmPackage?: boolean;
    additionalFiles?: (string | AdditionalFileOptions)[];
    enable?: boolean;
}

Properties

npmPackage?: boolean

Recursively walk parent folders to find an NPM package file and use version found

Looks for these files in order:

  • package.json
  • package-lock.json
  • npm-shrinkwrap.json
true
additionalFiles?: (string | AdditionalFileOptions)[]

Absolute file paths to attempt to read for version information.

If the file is JSON will try to get top-level 'version' prop. Specify as AdditionalFileOptions to customize version prop.

AdditionalFileOptions

enable?: boolean
true