OptionalauthorOptionalavaOptionalbinOptionalbugsOptionalemail?: stringThe email address to which issues should be reported.
Optionalurl?: stringThe url to your project's issue tracker.
OptionalbundledArray of package names that will be bundled when publishing the package.
OptionalbundleDEPRECATED: This field is honored, but "bundledDependencies" is the correct field name.
OptionalconfigA 'config' hash can be used to set configuration parameters used in package scripts that persist across upgrades.
OptionalcontributorsA list of people who contributed to this package.
OptionalcpuSpecify that your code only runs on certain cpu architectures.
OptionaldependenciesOptionaldescriptionThis helps people discover your package, as it's listed in 'npm search'.
OptionaldevOptionaldirectoriesOptionalbin?: stringIf you specify a 'bin' directory, then all the files in that folder will be used as the 'bin' hash.
Optionaldoc?: stringPut markdown files in here. Eventually, these will be displayed nicely, maybe, someday.
Optionalexample?: stringPut example scripts in here. Someday, it might be exposed in some clever way.
Optionallib?: stringTell people where the bulk of your library is. Nothing special is done with the lib folder in any way, but it's useful meta info.
Optionalman?: stringA folder that is full of man pages. Sugar to generate a 'man' array by walking the folder.
Optionaltest?: stringOptionaldistOptionalenginesOptionalengineOptionaleslintOptionalesnextA module ID with untranspiled code that is the primary entry point to your program.
OptionalexportsThe "exports" field is used to restrict external access to non-exported module files, also enables a module to import itself using "name".
The module path prefix that is resolved when the module specifier starts with "name/", set to "./*" to allow external modules to import any subpath.
This interface was referenced by undefined's JSON-Schema definition
via the patternProperty "^./.+".
Optional.?: PackageExportsEntry | PackageExportsFallbackThe module path that is resolved when the module specifier matches "name", shadows the "main" field.
OptionalfilesThe 'files' field is an array of files to include in your project. If you name a folder in the array, then it will also include the files inside that folder.
OptionalfundingOptionalhomepageThe url to the project homepage.
Optionali18nOptionalimportmapOptionaljscpdOptionaljspmOptionalkeywordsThis helps people discover your package as it's listed in 'npm search'.
OptionallicenseYou 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.
OptionallicensesDEPRECATED: Instead, use SPDX expressions, like this: { "license": "ISC" } or { "license": "(MIT OR Apache-2.0)" } see: 'https://docs.npmjs.com/files/package.json#license'.
OptionalmainThe main field is a module ID that is the primary entry point to your program.
OptionalmaintainersA list of people who maintains this package.
OptionalmanSpecify either a single file or an array of filenames to put in place for the man program to find.
OptionalmoduleAn ECMAScript module ID that is the primary entry point to your program.
The name of the package.
OptionaloptionalOptionalosSpecify which operating systems your module will run on.
OptionaloverridesOverrides is used to support selective version overrides using npm, which lets you define custom package versions or ranges inside your dependencies. For yarn, use resolutions instead. See: https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides
OptionalpackageDefines which package manager is expected to be used when working on the current project. This field is currently experimental and needs to be opted-in; see https://nodejs.org/api/corepack.html
OptionalpeerOptionalpeerWhen a user installs your package, warnings are emitted if packages specified in "peerDependencies" are not already installed. The "peerDependenciesMeta" field serves to provide more information on how your peer dependencies are utilized. Most commonly, it allows peer dependencies to be marked as optional. Metadata for this field is specified with a simple hash of the package name to a metadata object.
OptionalpreferDEPRECATED: This option used to trigger an npm warning, but it will no longer warn. It is purely there for informational purposes. It is now recommended that you install any binaries as local devDependencies wherever possible.
OptionalprettierOptionalprivateIf set to true, then npm will refuse to publish it.
OptionalpublishOptionalreadmeOptionalreleaseOptionalrepositorySpecify the place where your code lives. This is helpful for people who want to contribute.
OptionalresolutionsResolutions is used to support selective version resolutions using yarn, which lets you define custom package versions or ranges inside your dependencies. For npm, use overrides instead. See: https://classic.yarnpkg.com/en/docs/selective-version-resolutions
OptionalscriptsThe 'scripts' member is an object hash of script 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.
Optionalinstall?: stringOptionallint?: stringRun code quality tools, e.g. ESLint, TSLint, etc.
Optionalpostinstall?: stringOptionalpostpack?: stringRun AFTER the tarball has been generated and moved to its final destination.
Optionalpostpublish?: stringOptionalpostrestart?: stringOptionalpoststart?: stringOptionalpoststop?: stringOptionalposttest?: stringOptionalpostuninstall?: stringRun AFTER the package is uninstalled.
Optionalpostversion?: stringRun AFTER bump the package version.
Optionalpreinstall?: stringRun BEFORE the package is installed.
Optionalprepack?: stringrun BEFORE a tarball is packed (on npm pack, npm publish, and when installing git dependencies).
Optionalprepare?: stringRun both BEFORE the package is packed and published, and on local npm install without any arguments. This is run AFTER prepublish, but BEFORE prepublishOnly.
Optionalprepublish?: stringRun BEFORE the package is published (Also run on local npm install without any arguments).
OptionalprepublishOnly?: stringRun BEFORE the package is prepared and packed, ONLY on npm publish.
Optionalprerestart?: stringOptionalprestart?: stringOptionalprestop?: stringOptionalpretest?: stringOptionalpreuninstall?: stringOptionalpreversion?: stringOptionalpublish?: stringPublishes a package to the registry so that it can be installed by name. See https://docs.npmjs.com/cli/v8/commands/npm-publish
Optionalrestart?: stringOptionalserve?: stringStart dev server to serve application files
Optionalstart?: stringOptionalstop?: stringOptionaltest?: stringOptionaluninstall?: stringOptionalversion?: stringOptionalstylelintOptionaltypeWhen set to "module", the type field allows a package to specify all .js files within are ES modules. If the "type" field is omitted or set to "commonjs", all .js files are treated as CommonJS.
OptionaltypesSet the types property to point to your bundled declaration file.
OptionaltypesThe "typesVersions" field is used since TypeScript 3.1 to support features that were only made available in newer TypeScript versions.
Contains overrides for the TypeScript version that matches the version range matching the property key.
Optional*?: string[]Maps all file paths to the file paths specified in the array.
OptionaltypingsNote that the "typings" field is synonymous with "types", and could be used as well.
Version must be parseable by node-semver, which is bundled with npm as a dependency.
OptionalworkspacesAllows packages within a directory to depend on one another using direct linking of local files. Additionally, dependencies within a workspace are hoisted to the workspace root when possible to reduce duplication. Note: It's also a good idea to set "private" to true when using this feature.
Optionalnohoist?: string[]Packages to block from hoisting to the workspace root. Currently only supported in Yarn only.
Optionalpackages?: string[]Workspace package paths. Glob patterns are supported.
The url to your project's issue tracker and / or the email address to which issues should be reported. These are helpful for people who encounter issues with your package.