Skip to content

Commit cbb8481

Browse files
committed
Clarify supported features for esproj and update links
1 parent 2427962 commit cbb8481

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

docs/javascript/compile-typescript-code-npm.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Compile and build TypeScript code using npm
33
description: Add TypeScript support to your Visual Studio projects by using the Node Package Manager (npm) package for portability across different platforms and environments.
4-
ms.date: 10/23/2023
4+
ms.date: 5/15/2025
55
ms.topic: conceptual
66
author: "mikejo5000"
77
ms.author: "mikejo"
@@ -31,11 +31,11 @@ The [TypeScript npm package](https://www.npmjs.com/package/typescript) adds Type
3131

3232
::: moniker range=">=vs-2022"
3333
For projects created using the JavaScript Project System (JSPS), or *.esproj*, no additional workloads are needed. You just need to install npm (https://www.npmjs.com/), which is included with Node.js.
34-
35-
For the older project type (.njsproj), you need to install the Node.js development workload and the Node.js runtime.
3634
::: moniker-end
3735

3836
::: moniker range="vs-2019"
37+
For the Node.js project type (.njsproj), you need to install the Node.js development workload and the Node.js runtime.
38+
3939
[Follow instructions](./tutorial-nodejs.md?toc=%252fvisualstudio%252fjavascript%252ftoc.json) to install the Node.js development workload and npm (https://www.npmjs.com/), which is included with Node.js.
4040

4141
For a simple Visual Studio integration, create your project using one of the Node.js TypeScript templates, such as the Blank Node.js Web Application template. Else, use either a Node.js JavaScript template included with Visual Studio and follow instructions here. Or, use an [Open Folder](../javascript/develop-javascript-code-without-solutions-projects.md) project.
@@ -45,7 +45,9 @@ The [TypeScript npm package](https://www.npmjs.com/package/typescript) adds Type
4545

4646
From Solution Explorer (right pane), open the *package.json* in the project root. The packages listed correspond to packages under the npm node in Solution Explorer. For more information, see [Manage npm packages](../javascript/npm-package-management.md).
4747

48-
For a Node.js project, you can install the TypeScript npm package using the command line or the IDE. To install using the IDE, right-click the npm node in Solution Explorer, choose **Install New npm package**, search for **TypeScript**, and install the package.
48+
::: moniker range="vs-2019"
49+
For the older Node.js project type, you can install the TypeScript npm package using the command line or the IDE. To install using the IDE, right-click the npm node in Solution Explorer, choose **Install New npm package**, search for **TypeScript**, and install the package.
50+
::: moniker-end
4951

5052
Check the **npm** option in the **Output** window to see package installation progress. The installed package shows up under the **npm** node in Solution Explorer.
5153

@@ -114,10 +116,17 @@ The [TypeScript npm package](https://www.npmjs.com/package/typescript) adds Type
114116
For an example of using Vue.js with TypeScript, see [Create a Vue.js application](create-application-with-vuejs.md).
115117
::: moniker-end
116118

117-
1. If you need to configure options such as the startup page, path to the Node.js runtime, application port, or runtime arguments, right-click the project node in Solution Explorer, and choose **Properties**.
119+
1. If you need to configure build and deployment options such as the app URL or runtime commands, right-click the project node in Solution Explorer, and choose **Properties**.
120+
121+
::: moniker range=">=vs-2022"
122+
>[!NOTE]
123+
> When configuring third-party tools, projects using the JavaScript Project System (JSPS), or *.esproj*, don't use the paths that are configured under **Tools** > **Options** > **Projects and solutions** > **Web Package Management** > **External Web Tools**. These settings are used for other project types.
124+
::: moniker-end
118125

126+
::: moniker range="vs-2019"
119127
>[!NOTE]
120128
> When configuring third-party tools, Node.js projects don't use the paths that are configured under **Tools** > **Options** > **Projects and solutions** > **Web Package Management** > **External Web Tools**. These settings are used for other project types.
129+
::: moniker-end
121130

122131
1. Choose **Build > Build Solution**.
123132

@@ -141,8 +150,15 @@ Press **Ctrl+F5** (or **Debug > Start Without Debugging**) to run the applicatio
141150

142151
You can use Task Runner Explorer in Visual Studio to help automate tasks for third-party tools like npm and webpack.
143152

153+
::: moniker range=">=vs-2022"
154+
- [NPM Task Runner](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.NpmTaskRunner64) - Adds support for npm scripts defined in *package.json*. Supports yarn.
155+
- [Webpack Task Runner](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.WebPackTaskRunner) - Adds support for webpack.
156+
::: moniker-end
157+
158+
::: moniker range="vs-2019"
144159
- [NPM Task Runner](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.NPMTaskRunner) - Adds support for npm scripts defined in *package.json*. Supports yarn.
145160
- [Webpack Task Runner](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.WebPackTaskRunner) - Adds support for webpack.
161+
::: moniker-end
146162

147163
## Related content
148164

0 commit comments

Comments
 (0)