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`
@@ -71,6 +71,10 @@ situations. These scripts happen in addition to the `pre<event>`, `post<event>`,
71
71
**postpack**
72
72
* 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)
73
73
74
+
**dependencies**
75
+
* Runs AFTER any operations that modify the `node_modules` directory IF changes occurred.
76
+
* Does NOT run in global mode
77
+
74
78
#### Prepare and Prepublish
75
79
76
80
**Deprecation Note: prepublish**
@@ -96,6 +100,10 @@ The advantage of doing these things at `prepublish` time is that they can be don
96
100
* You don't need to rely on your users having `curl` or `wget` or
97
101
other system tools on the target machines.
98
102
103
+
#### Dependencies
104
+
105
+
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: deps/npm/docs/content/using-npm/workspaces.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ structure of files and folders:
57
57
```
58
58
.
59
59
+-- node_modules
60
-
| `-- packages/a -> ../packages/a
60
+
| `-- a -> ../packages/a
61
61
+-- package-lock.json
62
62
+-- package.json
63
63
`-- packages
@@ -112,15 +112,15 @@ respect the provided `workspace` configuration.
112
112
113
113
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
114
114
by its declared `package.json``name`. Continuing from the example defined
115
-
above, let's also create a Node.js script that will require the `workspace-a`
115
+
above, let's also create a Node.js script that will require the workspace`a`
0 commit comments