The author of the project.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#people-fields-author-contributors
Optional
binA lot of packages have one or more executable files that they'd like to install into the PATH. npm makes this pretty easy (in fact, it uses this feature to install the "npm" executable.)
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#bin
Optional
browserIf your module is meant to be used client-side the browser field should be used instead of the main field.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#browser
Optional
bugsThe url to your project's issue tracker and / or the email address to which issues should be reported.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#bugs
Optional
bundleThis defines an array of package names that will be bundled when publishing the package.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#bundledependencies
Optional
configA "config" object can be used to set configuration parameters used in package scripts that persist across upgrades.
It could have a start
command that referenced the npm_package_config_port
environment variable.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#config
Optional
contributorsThe contributors of the project.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#people-fields-author-contributors
Optional
cpuIf your code only runs on certain cpu architectures, you can specify which ones.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#engines
Optional
dependenciesDependencies are specified in a simple object that maps a package name to a version range. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or git URL.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#dependencies
Put a description in it. This helps people discover your package, as it's listed in npm search
.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#description-1
Optional
devIf someone is planning on downloading and using your module in their program, then they probably don't want or need to download and build the external test or documentation framework that you use.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#devdependencies
Optional
directoriesThe CommonJS Packages spec details a few ways that you can indicate the structure of your package using a directories object.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#directories
Optional
enginesYou can specify the version of node that your stuff works on. And, like with dependencies, if you don't specify the version (or if you specify "*" as the version), then any version of node will do. You can also use the "engines" field to specify which versions of npm are capable of properly installing your program.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#engines
Optional
filesThe optional files field is an array of file patterns that describes the entries to be included when your package is installed as a dependency.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#files
Optional
fundingUp-to-date information about ways to help fund development of your package.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#funding
Optional
homepageThe url to the project homepage.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#homepage
Optional
keywordsPut keywords in it. This helps people discover your package as it's listed in npm search
.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#keywords
You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#license
Optional
mainThe main field is a module ID that is the primary entry point to your program.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#main
Optional
manSpecify either a single file or an array of filenames to put in place for the man program to find.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#man
Optional
optionalIf a dependency can be used, but you would like npm to proceed if it cannot be found or fails to install, then you may put it in the optionalDependencies object.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#optionaldependencies
Optional
osYou can specify which operating systems your module will run on.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#os
Optional
overridesIf you need to make specific changes to dependencies of your dependencies, for example replacing the version of a dependency with a known security issue, replacing an existing dependency with a fork, or making sure that the same version of a package is used everywhere, then you may add an override.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides
Optional
peerIn some cases, you want to express the compatibility of your package with a host tool or library, while not necessarily doing a require of this host. This is usually referred to as a plugin.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#peerdependencies
Optional
peerWhen a user installs your package, npm will emit warnings if packages specified in peerDependencies are not already installed.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#peerdependenciesmeta
Optional
privateIf you set "private": true in your package.json, then npm will refuse to publish it.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#private
Optional
publishThis is a set of config values that will be used at publish-time.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#publishconfig
Optional
repositorySpecify the place where your code lives. This is helpful for people who want to contribute. If the git repo is on GitHub, then the npm docs command will be able to find you.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#repository
Optional
scriptsScript commands that are run at various times in the lifecycle of your package. The key is the lifecycle event, and the value is the command to run at that point.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#scripts
Optional
workspacesThe optional workspaces field is an array of file patterns that describes locations within the local file system that the install client should look up to find each workspace that needs to be symlinked to the top level node_modules folder.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#workspaces
Generated using TypeDoc
A package.json representation.
See
https://docs.npmjs.com/cli/v9/configuring-npm/package-json