Interface PluginPackageJson

Hierarchy

  • CoreProperties
    • PluginPackageJson

Properties

author?: Person
bin?: string | {
    [k: string]: any;
}
bugs?: string | {
    [k: string]: any;
}

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.

config?: {
    [k: string]: any;
}

A 'config' hash can be used to set configuration parameters used in package scripts that persist across upgrades.

Type declaration

  • [k: string]: any
contributors?: Person[]

A list of people who contributed to this package.

cpu?: string[]

If your code only runs on certain cpu architectures, you can specify which ones.

dependencies?: Dependency
description?: string

This helps people discover your package, as it's listed in 'npm search'.

devDependencies?: Dependency
directories?: {
    bin?: string;
    doc?: string;
    example?: string;
    lib?: string;
    man?: string;
    test?: string;
    [k: string]: any;
}

Type declaration

  • [k: string]: any
  • Optional bin?: string

    If you specify a 'bin' directory, then all the files in that folder will be used as the 'bin' hash.

  • Optional doc?: string

    Put markdown files in here. Eventually, these will be displayed nicely, maybe, someday.

  • Optional example?: string

    Put example scripts in here. Someday, it might be exposed in some clever way.

  • Optional lib?: string

    Tell 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.

  • Optional man?: string

    A folder that is full of man pages. Sugar to generate a 'man' array by walking the folder.

  • Optional test?: string
dist?: {
    shasum?: string;
    tarball?: string;
    [k: string]: any;
}

Type declaration

  • [k: string]: any
  • Optional shasum?: string
  • Optional tarball?: string
engineStrict?: boolean
engines?: {
    [k: string]: string;
}

Type declaration

  • [k: string]: string
esnext?: string | {
    [k: string]: any;
}

A module ID with untranspiled code that is the primary entry point to your program.

files?: string[]

The '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.

homepage?: {
    [k: string]: any;
} | "."

The url to the project homepage.

keywords?: string[]

This helps people discover your package as it's listed in 'npm search'.

license?: string

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.

licenses?: {
    type?: string;
    url?: string;
    [k: string]: any;
}[]

DEPRECATED: Instead, use SPDX expressions, like this: { "license": "ISC" } or { "license": "(MIT OR Apache-2.0)" } see: 'https://docs.npmjs.com/files/package.json#license'

main?: string

The main field is a module ID that is the primary entry point to your program.

maintainers?: Person[]

A list of people who maintains this package.

man?: string[]

Specify either a single file or an array of filenames to put in place for the man program to find.

module?: string

An ECMAScript module ID that is the primary entry point to your program.

name?: string

The name of the package.

optionalDependencies?: Dependency
os?: string[]

You can specify which operating systems your module will run on

peerDependencies?: Dependency
preferGlobal?: boolean

DEPRECATED: 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.

private?: boolean

If set to true, then npm will refuse to publish it.

publishConfig?: {
    [k: string]: any;
}

Type declaration

  • [k: string]: any
readme?: string
repository?: string | {
    [k: string]: any;
}

Specify the place where your code lives. This is helpful for people who want to contribute.

resolutions?: Dependency
scripts?: {
    install?: string;
    postinstall?: string;
    postpack?: string;
    postpublish?: string;
    postrestart?: string;
    poststart?: string;
    poststop?: string;
    posttest?: string;
    postuninstall?: string;
    postversion?: string;
    preinstall?: string;
    prepack?: string;
    prepare?: string;
    prepublish?: string;
    prepublishOnly?: string;
    prerestart?: string;
    prestart?: string;
    prestop?: string;
    pretest?: string;
    preuninstall?: string;
    preversion?: string;
    publish?: string;
    restart?: string;
    start?: string;
    stop?: string;
    test?: string;
    uninstall?: string;
    version?: string;
    [k: string]: string | undefined;
}

The '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.

Type declaration

  • [k: string]: string | undefined
  • Optional install?: string
  • Optional postinstall?: string
  • Optional postpack?: string

    Run AFTER the tarball has been generated and moved to its final destination.

  • Optional postpublish?: string
  • Optional postrestart?: string
  • Optional poststart?: string
  • Optional poststop?: string
  • Optional posttest?: string
  • Optional postuninstall?: string

    Run AFTER the package is uninstalled

  • Optional postversion?: string

    Run AFTER bump the package version

  • Optional preinstall?: string

    Run BEFORE the package is installed

  • Optional prepack?: string

    run BEFORE a tarball is packed (on npm pack, npm publish, and when installing git dependencies)

  • Optional prepare?: string

    Run both BEFORE the package is packed and published, and on local npm install without any arguments. This is run AFTER prepublish, but BEFORE prepublishOnly

  • Optional prepublish?: string

    Run BEFORE the package is published (Also run on local npm install without any arguments)

  • Optional prepublishOnly?: string

    Run BEFORE the package is prepared and packed, ONLY on npm publish

  • Optional prerestart?: string
  • Optional prestart?: string
  • Optional prestop?: string
  • Optional pretest?: string
  • Optional preuninstall?: string
  • Optional preversion?: string
  • Optional publish?: string
  • Optional restart?: string
  • Optional start?: string
  • Optional stop?: string
  • Optional test?: string
  • Optional uninstall?: string
  • Optional version?: string
types?: string

Set the types property to point to your bundled declaration file

typings?: string

Note that the "typings" field is synonymous with "types", and could be used as well.

version?: string

Version must be parseable by node-semver, which is bundled with npm as a dependency.

workspaces?: string[]

Generated using TypeDoc