Skip to content

Commit caf58a6

Browse files
committed
fix(plugin): adjust add-soba generator to make sure all peer deps are installed properly
1 parent d97d48d commit caf58a6

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Diff for: libs/plugin/src/generators/add-soba/generator.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import { SOBA_PEER_DEPENDENCIES } from '../version';
66
const ENTRY_POINTS = {
77
abstractions: ['troika-three-text'],
88
controls: ['camera-controls', 'maath'],
9-
materials: ['three-custom-shader-material', 'three-mesh-bvh'],
9+
materials: ['three-custom-shader-material'],
1010
staging: ['troika-three-text', '@monogrid/gainmap-js'],
1111
stats: ['stats-gl'],
1212
};
1313

1414
export async function addSobaGenerator(tree: Tree) {
15-
const packagesToAdd = ['three-stdlib', '@pmndrs/vanilla'];
15+
const packagesToAdd = ['three-stdlib', '@pmndrs/vanilla', 'three-mesh-bvh'];
1616

1717
const packageJson = readJson(tree, 'package.json');
1818
const ngtVersion = packageJson['dependencies']['angular-three'] || packageJson['devDependencies']['angular-three'];
@@ -72,7 +72,7 @@ export async function addSobaGenerator(tree: Tree) {
7272
}
7373
return acc;
7474
},
75-
{} as Record<string, string>,
75+
{ 'angular-three-soba': ngtVersion } as Record<string, string>,
7676
);
7777

7878
// add deps to package.json

Diff for: libs/soba/abstractions/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ This module provides abstract components and patterns for building reusable and
55
| Package | Description |
66
| ------------------- | -------------------------------------------- |
77
| `troika-three-text` | Required for using the `NgtsText` component. |
8+
| `three-mesh-bvh` | Required for `angular-three-soba/shaders` |
89

910
To install these dependencies, use one of the following commands:
1011

1112
```bash
12-
npm install troika-three-text
13-
# yarn add troika-three-text
14-
# pnpm add troika-three-text
13+
npm install troika-three-text three-mesh-bvh
14+
# yarn add troika-three-text three-mesh-bvh
15+
# pnpm add troika-three-text three-mesh-bvh
1516
```
1617

1718
## TOC

0 commit comments

Comments
 (0)