Commit 763b9c8
committed
fix(cli): remove project references from examples
In #5155, we reworked our typescript setup
to leverage composite mode and project references. This breaks our
example applications when they are checked out standalone, typically
via `lb4 example`.
```sh
$ lb4 example todo
(...)
$ cd loopback4-example-todo
$ npm t
(...)
> lb-tsc
error TS6053: File '/private/packages/http-caching-proxy/tsconfig.json' not found.
error TS6053: File '/private/packages/testlab/tsconfig.json' not found.
(...)
Found 10 errors.
```
This commit fixes the problem by introducing a new step to `lb4 example`
command where we remove `references` field from `tsconfig.json` file
and set the field `compilerOptions.composite` to `false`.
Signed-off-by: Miroslav Bajtoš <[email protected]>1 parent de3f080 commit 763b9c8
File tree
2 files changed
+39
-2
lines changed- packages/cli
- generators/example
- test/integration/generators
2 files changed
+39
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
135 | 137 | | |
136 | 138 | | |
137 | | - | |
138 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
139 | 151 | | |
140 | 152 | | |
141 | 153 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
90 | 115 | | |
0 commit comments