Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(npm-scripts): highlight scripts in list #271

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions doc/misc/npm-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,47 @@ npm-scripts(7) -- How npm handles the "scripts" field
npm supports the "scripts" property of the package.json file, for the
following scripts:

* prepublish:
* **prepublish**:
Run BEFORE the package is packed and published, as well as on local `npm
install` without any arguments. (See below)
* prepare:
* **prepare**:
Run both BEFORE the package is packed and published, on local `npm
install` without any arguments, and when installing git dependencies (See
below). This is run AFTER `prepublish`, but BEFORE `prepublishOnly`.
* prepublishOnly:
* **prepublishOnly**:
Run BEFORE the package is prepared and packed, ONLY on `npm publish`. (See
below.)
* prepack:
* **prepack**:
run BEFORE a tarball is packed (on `npm pack`, `npm publish`, and when
installing git dependencies)
* postpack:
* **postpack**:
Run AFTER the tarball has been generated and moved to its final destination.
* publish, postpublish:
* **publish**, **postpublish**:
Run AFTER the package is published.
* preinstall:
* **preinstall**:
Run BEFORE the package is installed
* install, postinstall:
* **install**, **postinstall**:
Run AFTER the package is installed.
* preuninstall, uninstall:
* **preuninstall**, **uninstall**:
Run BEFORE the package is uninstalled.
* postuninstall:
* **postuninstall**:
Run AFTER the package is uninstalled.
* preversion:
* **preversion**:
Run BEFORE bumping the package version.
* version:
* **version**:
Run AFTER bumping the package version, but BEFORE commit.
* postversion:
* **postversion**:
Run AFTER bumping the package version, and AFTER commit.
* pretest, test, posttest:
* **pretest**, **test**, **posttest**:
Run by the `npm test` command.
* prestop, stop, poststop:
* **prestop**, **stop**, **poststop**:
Run by the `npm stop` command.
* prestart, start, poststart:
* **prestart**, **start**, **poststart**:
Run by the `npm start` command.
* prerestart, restart, postrestart:
* **prerestart**, **restart**, **postrestart**:
Run by the `npm restart` command. Note: `npm restart` will run the
stop and start scripts if no `restart` script is provided.
* preshrinkwrap, shrinkwrap, postshrinkwrap:
* **preshrinkwrap**, **shrinkwrap**, **postshrinkwrap**:
Run by the `npm shrinkwrap` command.

Additionally, arbitrary scripts can be executed by running `npm
Expand Down