pub struct Package {Show 27 fields
pub name: String,
pub version: String,
pub description: Option<String>,
pub keywords: Vec<String>,
pub homepage: Option<String>,
pub bugs: Option<Bug>,
pub license: Option<String>,
pub author: Option<PersonReference>,
pub contributors: Vec<PersonReference>,
pub files: Vec<String>,
pub main: Option<String>,
pub browser: Option<String>,
pub bin: BinSet,
pub man: Option<ManReference>,
pub repository: Option<RepositoryReference>,
pub scripts: ScriptsSet,
pub dependencies: DepsSet,
pub dev_dependencies: DepsSet,
pub peer_dependencies: DepsSet,
pub bundled_dependencies: DepsSet,
pub optional_dependencies: DepsSet,
pub engines: EnginesSet,
pub private: bool,
pub os: Vec<String>,
pub cpu: Vec<String>,
pub config: Option<Value>,
pub others: BTreeMap<String, Value>,
}Expand description
The top-level package.json structure.
Fields§
§name: StringThe package name.
version: StringThe package version.
description: Option<String>The optional package description.
keywords: Vec<String>The optional list of keywords.
homepage: Option<String>The optional package homepage.
bugs: Option<Bug>The optional bug contact form.
license: Option<String>The optional package license.
The optional author.
contributors: Vec<PersonReference>The optional list of contributors.
files: Vec<String>The optional list of files to include. Each entry defines a regex pattern.
main: Option<String>The optional package main entry file.
browser: Option<String>The optional package browser entry file.
This is usually defined in libraries that are meant to be consumed by
browsers. These Thoes can refer to objects that are not available inside
a nodejs environment (like window).
bin: BinSetThe optional set of binary definitions.
man: Option<ManReference>The optional list of man page references.
repository: Option<RepositoryReference>The optional repository reference.
scripts: ScriptsSetThe optional list of script entries.
dependencies: DepsSetThe optional list of dependencies.
dev_dependencies: DepsSetThe optional list of development dependencies.
peer_dependencies: DepsSetThe optional list of peer dependencies.
bundled_dependencies: DepsSetThe optional list of bundled dependencies.
optional_dependencies: DepsSetThe optional list of optional dependencies.
engines: EnginesSetThe optional list of engine entries.
private: boolThe package privacy.
os: Vec<String>The OS’ that the package can run on.
cpu: Vec<String>The CPU architectures that the package can run on.
config: Option<Value>The optional config object.
others: BTreeMap<String, Value>Other custom fields that have been defined inside the package.json
file.