You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Runs any time before the package is packed, i.e. during `npm publish`
@@ -79,6 +79,10 @@ situations. These scripts happen in addition to the `pre<event>`, `post<event>`,
79
79
**postpack**
80
80
* Runs AFTER the tarball has been generated but before it is moved to its final destination (if at all, publish does not save the tarball locally)
81
81
82
+
**dependencies**
83
+
* Runs AFTER any operations that modify the `node_modules` directory IF changes occurred.
84
+
* Does NOT run in global mode
85
+
82
86
#### Prepare and Prepublish
83
87
84
88
**Deprecation Note: prepublish**
@@ -104,6 +108,10 @@ The advantage of doing these things at `prepublish` time is that they can be don
104
108
* You don't need to rely on your users having `curl` or `wget` or
105
109
other system tools on the target machines.
106
110
111
+
#### Dependencies
112
+
113
+
The `dependencies` script is run any time an `npm` command causes changes to the `node_modules` directory. It is run AFTER the changes have been applied and the `package.json` and `package-lock.json` files have been updated.
Copy file name to clipboardExpand all lines: content/cli/v8/using-npm/workspaces.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ structure of files and folders:
65
65
```
66
66
.
67
67
+-- node_modules
68
-
| `-- packages/a -> ../packages/a
68
+
| `-- a -> ../packages/a
69
69
+-- package-lock.json
70
70
+-- package.json
71
71
`-- packages
@@ -120,15 +120,15 @@ respect the provided `workspace` configuration.
120
120
121
121
Given the [specifities of how Node.js handles module resolution](https://nodejs.org/dist/latest-v14.x/docs/api/modules.html#modules_all_together) it's possible to consume any defined workspace
122
122
by its declared `package.json``name`. Continuing from the example defined
123
-
above, let's also create a Node.js script that will require the `workspace-a`
123
+
above, let's also create a Node.js script that will require the workspace`a`
0 commit comments