File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,34 @@ jasmine_node_test(
265
265
)
266
266
```
267
267
268
+ #### Multiple sets of npm dependencies
269
+
270
+ If your workspace has multiple applications, each with their own ` package.json `
271
+ and npm deps, ` yarn_install ` (or ` npm_install ` ) can be called separately for
272
+ each.
273
+
274
+ ``` python
275
+ workspace(
276
+ name = " my_wksp" ,
277
+ managed_directories = {" @app1_npm" : [" app1/node_modules" ],
278
+ " @app2_npm" : [" app2/node_modules" ]}},
279
+ )
280
+
281
+ yarn_install(
282
+ name = " app1_npm" ,
283
+ package_json = " //app1:package.json" ,
284
+ yarn_lock = " //app1:yarn.lock" ,
285
+ )
286
+
287
+ yarn_install(
288
+ name = " app2_npm" ,
289
+ package_json = " //app2:package.json" ,
290
+ yarn_lock = " //app2:yarn.lock" ,
291
+ )
292
+ ```
293
+
294
+ Your application would then reference its deps as (for example) ` @app1//lodash ` , or ` @app2//jquery ` .
295
+
268
296
#### Fine-grained npm package nodejs_binary targets
269
297
270
298
If an npm package lists one or more ` bin ` entry points in its ` package.json ` ,
You can’t perform that action at this time.
0 commit comments