Skip to content

Commit 7b454f6

Browse files
Add npm install step, fix typo, recommend @/types packages.
1 parent 18432c7 commit 7b454f6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ npm install -g @sourcegraph/lsif-typescript
1515
Navigate to the project root, containing `tsconfig.json`.
1616

1717
```sh
18+
npm install # or yarn install
1819
lsif-typescript index
1920
```
2021

@@ -23,15 +24,20 @@ lsif-typescript index
2324
Navigate to the project root, containing `package.json`.
2425

2526
```sh
27+
npm install # or yarn install
2628
lsif-typescript index --infer-tsconfig
2729
```
2830

31+
To improve the quality of indexing results for JavaScript,
32+
consider adding `@types/*` packages as `devDependencies` in `package.json`.
33+
2934
### Index a TypeScript project using Yarn workspaces
3035

3136
Navigate to the project root, containing `package.json`.
3237

3338
```
34-
lsif-typescript index --yarn-workspaces.
39+
npm install # or yarn install
40+
lsif-typescript index --yarn-workspaces
3541
```
3642

3743
### Indexing in CI
@@ -40,6 +46,7 @@ Add the following run steps to your CI pipeline:
4046

4147
```sh
4248
npm install -g @sourcegraph/lsif-typescript
49+
npm install # or yarn install
4350
lsif-typescript index
4451
# From https://github.com/sourcegraph/src-cli/
4552
src lsif upload

0 commit comments

Comments
 (0)