blob: f099aec13b4a700e890d5aa90c86bddb8f54a328 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# npmHooks.npmInstallHook {#npm-install-hook}
Hook to install node_modules for npm packages.
Does not create wrappers for executable npm projects
Primarily made for a multi-language environment.
## Examples {#npm-install-hook-snippet}
[](#npm-build-hook-example-snippet)
## Variables controlling `npmInstallHook` {#npm-install-hook-variables}
### `npmInstallHook` Exclusive Variables {#npm-install-hook-exclusive-variables}
#### `dontNpmPrune` {#npm-install-hook-dont-prune}
Whether to run {command}`npm prune` on the `node_modules` or not.
Defaults to `true`.
#### `npmInstallFlags` {#npm-install-hook-prune-flags}
Flags to pass to the {command}`npm prune` call for the `node_modules` of the package.
Defaults to `--omit=dev --no-save` which cannot be modified.
#### `dontNpmInstall` {#npm-install-hook-dont}
Controls whether `npmInstallHook` is enabled or not.
Defaults to `true`, so the hook will run.
### Honored Variables {#npm-install-hook-honored-variables}
The following variables are honored by the `npmInstallHook`.
- [`npmWorkspace`](#javascript-buildNpmPackage-npmWorkspace)
- [`npmFlags`](#javascript-buildNpmPackage-npmFlags)
|