new Package(json)
Parameters:
| Name | Type | Description |
|---|---|---|
json |
string | The contents of the `package.json` file. |
- Source:
Members
author :module:jsdoc/package.Package~PersonInfo|string
The author of this package. Contains either a
PersonInfo object or a string with
information about the author.
Type:
- Since:
- 3.3.0
- Source:
bugs :string|module:jsdoc/package.Package~BugInfo
Information about where to report bugs in the project. May contain a URL, a string, or an
object with more detailed information.
Type:
- string | module:jsdoc/package.Package~BugInfo
- Since:
- 3.3.0
- Source:
contributors :Array.<(module:jsdoc/package.Package~PersonInfo|string)>
The contributors to this package.
Type:
- Array.<(module:jsdoc/package.Package~PersonInfo|string)>
- Since:
- 3.3.0
- Source:
dependencies :Object
The dependencies for this package.
Type:
- Object
- Since:
- 3.3.0
- Source:
description :string
A brief description of the package.
Type:
- string
- Source:
devDependencies :Object
The development dependencies for this package.
Type:
- Object
- Since:
- 3.3.0
- Source:
engines :Object
The JavaScript engines that this package supports. Each key is a string that identifies
the engine (for example, `node`). Each value is a
[semver](https://www.npmjs.org/doc/misc/semver.html)-compliant version number for the
engine.
Type:
- Object
- Since:
- 3.3.0
- Source:
files :Array.<string>
The source files associated with the package.
New `Package` objects always contain an empty array, regardless of whether the `package.json`
file includes a `files` property.
After JSDoc parses your input files, it sets this property to a list of paths to your input
files.
Type:
- Array.<string>
- Source:
homepage :string
The URL for the package's homepage.
Type:
- string
- Since:
- 3.3.0
- Source:
keywords :Array.<string>
Keywords to help users find the package.
Type:
- Array.<string>
- Since:
- 3.3.0
- Source:
kind :string
The string identifier that is shared by all `Package` objects.
Type:
- string
- Default Value:
- package
- Source:
licenses :Array.<module:jsdoc/package.Package~LicenseInfo>
The licenses used by this package. Combines information from the `package.json` file's
`license` property and the deprecated `licenses` property.
Type:
- Source:
longname :string
The unique longname for this `Package` object.
Type:
- string
- Source:
main :string
The module ID that provides the primary entry point to the package. For example, if your
package is a CommonJS module, and the value of this property is `foo`, users should be
able to load your module with `require('foo')`.
Type:
- string
- Since:
- 3.3.0
- Source:
name :string
The package name.
Type:
- string
- Source:
repository :module:jsdoc/package.Package~RepositoryInfo
The version-control repository for the package.
Type:
- Since:
- 3.3.0
- Source:
version :string
The [semver](https://www.npmjs.org/doc/misc/semver.html)-compliant version number of the
package.
Type:
- string
- Since:
- 3.2.0
- Source: