Lines Matching full:npm
4 description: How npm handles the "scripts" field
12 `npm run-script <stage>` or `npm run <stage>` for short. *Pre* and *post*
15 `npm explore <pkg> -- npm run <stage>`.
33 In this example `npm run compress` would execute these scripts as
44 **prepare** (since `npm@4.0.0`)
45 * Runs BEFORE the package is packed, i.e. during `npm publish`
46 and `npm pack`
47 * Runs on local `npm install` without any arguments
55 * As of `npm@7` these scripts run in the background.
59 * Does not run during `npm publish`, but does run during `npm ci`
60 and `npm install`. See below for more info.
63 * Runs BEFORE the package is prepared and packed, ONLY on `npm publish`.
66 * Runs BEFORE a tarball is packed (on "`npm pack`", "`npm publish`", and when installing a git depe…
67 * NOTE: "`npm run pack`" is NOT the same as "`npm pack`". "`npm run pack`" is an arbitrary user def…
80 …npm@1.1.71`, the npm CLI has run the `prepublish` script for both `npm publish` and `npm install`,…
82 See <https://github.com/npm/npm/issues/10074> for a much lengthier justification, with further read…
103 The `dependencies` script is run any time an `npm` command causes changes to the `node_modules` dir…
107 #### [`npm cache add`](/commands/npm-cache)
111 #### [`npm ci`](/commands/npm-ci)
124 #### [`npm diff`](/commands/npm-diff)
128 #### [`npm install`](/commands/npm-install)
130 These also run when you run `npm install -g <pkg-name>`
141 haven't defined your own `install` or `preinstall` scripts, npm will
147 #### [`npm pack`](/commands/npm-pack)
153 #### [`npm publish`](/commands/npm-publish)
162 #### [`npm rebuild`](/commands/npm-rebuild)
172 #### [`npm restart`](/commands/npm-restart)
182 #### [`npm run <user defined>`](/commands/npm-run-script)
188 #### [`npm start`](/commands/npm-start)
194 If there is a `server.js` file in the root of your package, then npm
198 #### [`npm stop`](/commands/npm-stop)
204 #### [`npm test`](/commands/npm-test)
210 #### [`npm version`](/commands/npm-version)
216 #### A Note on a lack of [`npm uninstall`](/commands/npm-uninstall) scripts
218 While npm v6 had `uninstall` lifecycle scripts, npm v7 does not. Removal of a package can happen fo…
232 When npm is run as root, scripts are always run with the effective uid
238 are made available regarding the setup of npm and the current state of
259 then you could run `npm start` to execute the `bar` script, which is
260 exported into the `node_modules/.bin` directory on `npm install`.
272 See [`package.json`](/configuring-npm/package-json) for more on package configs.
336 * Try not to use scripts to do what npm can do for you. Read through
337 …[`package.json`](/configuring-npm/package-json) to see all the things that you can specify and ena…
346 the user will sudo the npm command in question.
353 current working directory is when `npm` is invoked. If you want your
356 were in when you ran `npm run`.
360 * [npm run-script](/commands/npm-run-script)
361 * [package.json](/configuring-npm/package-json)
362 * [npm developers](/using-npm/developers)
363 * [npm install](/commands/npm-install)