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;
} & Partial<Record<string, string>>

Type declaration

  • Optionalinstall?: string

    Run after the package is installed.

  • Optionalpostinstall?: string

    Run after the package is installed and after install.

  • Optionalpostpack?: string

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

  • Optionalpostpublish?: string

    Run after the package is published.

  • Optionalpostrestart?: string

    Run with the npm restart command, after restart. Note: npm restart will run the stop and start scripts if no restart script is provided.

  • Optionalpoststart?: string

    Run with the npm start command, after start.

  • Optionalpoststop?: string

    Run with the npm stop command, after stop.

  • Optionalposttest?: string

    Run with the npm test command, after test.

  • Optionalpostuninstall?: string

    Run after the package is uninstalled.

  • Optionalpostversion?: string

    Run after bump the package version.

  • Optionalpreinstall?: string

    Run before the package is installed.

  • Optionalprepack?: string

    Run before a tarball is packed (on npm pack, npm publish, and when installing git dependencies).

  • Optionalprepare?: 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.

  • Optionalprepublish?: string

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

  • OptionalprepublishOnly?: string

    Run before the package is prepared and packed, only on npm publish.

  • Optionalprerestart?: string

    Run with the npm restart command, before restart. Note: npm restart will run the stop and start scripts if no restart script is provided.

  • Optionalprestart?: string

    Run with the npm start command, before start.

  • Optionalprestop?: string

    Run with the npm stop command, before stop.

  • Optionalpretest?: string

    Run with the npm test command, before test.

  • Optionalpreuninstall?: string

    Run before the package is uninstalled and before uninstall.

  • Optionalpreversion?: string

    Run before bump the package version and before version.

  • Optionalpublish?: string

    Run after the package is published.

  • Optionalrestart?: string

    Run with the npm restart command. Note: npm restart will run the stop and start scripts if no restart script is provided.

  • Optionalstart?: string

    Run with the npm start command.

  • Optionalstop?: string

    Run with the npm stop command.

  • Optionaltest?: string

    Run with the npm test command.

  • Optionaluninstall?: string

    Run before the package is uninstalled.

  • Optionalversion?: string

    Run before bump the package version.