Commit c00b974
authored
docs: Update template README.md (JavaScript, TypeScript) (#28003)
Use npx to run project-specific cdk, not a globally installed version.
This ensures everybody working on the project uses the same version of the command-line interface.
With the previous instructions, if anybody had `cdk` installed globally, e.g., via `npm install --global aws-cdk` or `homebrew install aws-cdk`, they would run that version. It seems desirable that everybody working on a CDK app uses the same version of the command-line interface, as specified in `package.json` (or `package-lock.json`).
Example:
Given a `package.json` which specifies `"aws-cdk": "2.104.0"` and a globally installed `cdk`, this can happen:
```shell
$ cdk --version
2.108.1 (build 2320255)
$ npx cdk --version
2.104.0 (build 3b99abe)
```
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*1 parent bf9bb3d commit c00b974
2 files changed
+6
-6
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments