Skip to content

Commit 747edc2

Browse files
kyliauKeen Yee Liau
authored andcommitted
docs: Add instructions for local development
This commit adds instructions to DEVELOPER.md to explain 1. How to bring up the developer instance of VSCode 2. Build and install local `@angular/language-service`
1 parent 561b542 commit 747edc2

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

DEVELOPER.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,48 @@ for VS Code.
3131
```vim
3232
let g:clang_format#command = '<PATH_TO_REPOSITORY>/node_modules/.bin/clang-format'
3333
```
34+
35+
## Test Local Changes in VSCode
36+
37+
Any changes made to the code in this repository or the upstream
38+
`@angular/language-service` package can be immediately tested out in a
39+
development version of VSCode. The instructions below explain how to bring up
40+
a local instance and then install a local version of `@angular/language-service`.
41+
42+
### Check TypeScript version
43+
44+
First, make sure that the TypeScript version in `@angular/angular` is the same
45+
as that used in this repository. If not, update the following files:
46+
47+
1. `typescript` dependency in [`package.json`](package.json)
48+
2. `MIN_TS_VERSION` in [`version_provider.ts`](server/src/version_provider.ts)
49+
50+
### Launch VSCode in Extension Development Host
51+
52+
The scripts in `.vscode` directory are setup to automatically compile the code,
53+
then launch a new instance of VSCode with the Angular extension installed.
54+
To do so, either
55+
56+
1. Press F5, or
57+
2. Go to Run on the sidebar, select `Launch Client` from the task list
58+
59+
After the client is launched, you can optionally choose to attach a debugger to
60+
the local instance. To do so,
61+
62+
1. Go to Run on the sidebar, select `Attach to Server` from the task list
63+
64+
As a shortcut, there's also a task setup to automatically launch the client and
65+
attach the debugger in a single step. To do so,
66+
67+
1. Go to Run on the sidebar, select `Client + Server` from the task list
68+
69+
### Install Local `@angular/language-service`
70+
71+
If changes are made to the upstream language service package, they can also be
72+
tested locally. This involves building the NPM package, then updating the server
73+
dependency. To do so, run the following script from the `@angular/angular`
74+
repository.
75+
76+
```bash
77+
./packages/language-service/build.sh /path/to/vscode-ng-language-service
78+
```

0 commit comments

Comments
 (0)