Skip to content

Commit cfd8c4c

Browse files
Merge pull request #268288 from ggailey777/patch-2
[Functions] Flip Node.js version tabs
2 parents 7cf5ffd + 8bf8b63 commit cfd8c4c

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

articles/azure-functions/functions-develop-vs-code.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.custom:
1111
- devx-track-js
1212
- devx-track-python
1313
- ignite-2023
14-
ms.date: 11/14/2023
14+
ms.date: 03/06/2024
1515
zone_pivot_groups: programming-languages-set-functions
1616
#Customer intent: As an Azure Functions developer, I want to understand how Visual Studio Code supports Azure Functions so that I can more efficiently create, publish, and maintain my Functions projects.
1717
---
@@ -158,6 +158,13 @@ An HttpExample.cs class library file, the contents of which vary depending on wh
158158
::: zone-end
159159
::: zone pivot="programming-language-javascript,programming-language-typescript"
160160
Files generated depend on the chosen Node.js programming model for Functions:
161+
162+
### [v4](#tab/node-v4)
163+
164+
+ A package.json file in the root folder.
165+
166+
+ A named .js file in the _src\functions_ folder, which contains both the function definition and your function code.
167+
161168
### [v3](#tab/node-v3)
162169
+ A package.json file in the root folder.
163170

@@ -166,12 +173,6 @@ Files generated depend on the chosen Node.js programming model for Functions:
166173
+ The [function.json definition file](functions-reference-node.md#folder-structure)
167174
+ An [index.js file](functions-reference-node.md#exporting-a-function), which contains the function code.
168175

169-
### [v4](#tab/node-v4)
170-
171-
+ A package.json file in the root folder.
172-
173-
+ A named .js file in the _src\functions_ folder, which contains both the function definition and your function code.
174-
175176
---
176177

177178
::: zone-end
@@ -223,16 +224,16 @@ The results of this action are that a new Java (.java) file is added to your pro
223224
::: zone pivot="programming-language-javascript,programming-language-typescript"
224225
The results of this action depend on the Node.js model version.
225226

226-
### [v3](#tab/node-v3)
227-
228-
A new folder is created in the project. The folder contains a new function.json file and the new JavaScript code file.
229-
230227
### [v4](#tab/node-v4)
231228

232229
+ A package.json file in the root folder.
233230

234231
+ A named .js file in the _src\functions_ folder, which contains both the function definition and your function code.
235232

233+
### [v3](#tab/node-v3)
234+
235+
A new folder is created in the project. The folder contains a new function.json file and the new JavaScript code file.
236+
236237
---
237238
::: zone-end
238239
::: zone pivot="programming-language-powershell"
@@ -276,14 +277,14 @@ For example, to add an output binding that writes data to a storage queue you up
276277
::: zone pivot="programming-language-javascript"
277278
For example, the way you define the output binding that writes data to a storage queue depends on your Node.js model version:
278279

279-
### [v3](#tab/node-v3)
280-
281-
[!INCLUDE [functions-add-output-binding-vs-code](../../includes/functions-add-output-binding-vs-code.md)]
282-
283280
### [v4](#tab/node-v4)
284281

285282
Using the Node.js v4 model, you must manually add a `return:` option in the function definition using the `storageQueue` function on the `output` object, which defines the storage queue to write the `return` output. Output is written when the function completes.
286283

284+
### [v3](#tab/node-v3)
285+
286+
[!INCLUDE [functions-add-output-binding-vs-code](../../includes/functions-add-output-binding-vs-code.md)]
287+
287288
---
288289

289290
::: zone-end

includes/functions-add-output-binding-example-all-languages.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: ggailey777
33
ms.service: azure-functions
44
ms.topic: include
5-
ms.date: 08/18/2023
5+
ms.date: 03/06/2024
66
ms.author: glenga
77
---
88

@@ -44,13 +44,13 @@ Messages are sent to the queue when the function completes. The way you define t
4444
For more information, including links to example binding code that you can refer to, see [Add bindings to a function](../articles/azure-functions/add-bindings-existing-function.md?tabs=java#manually-add-bindings-based-on-examples).
4545
::: zone-end
4646
::: zone pivot="programming-language-javascript"
47-
### [v3](#tab/node-v3)
48-
:::code language="json" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli/HttpExample/function.json" highlight="18-24" :::
49-
5047
### [v4](#tab/node-v4)
5148

5249
Example binding for Node.js model v4 not yet available.
5350

51+
### [v3](#tab/node-v3)
52+
:::code language="json" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli/HttpExample/function.json" highlight="18-24" :::
53+
5454
---
5555

5656
The way you define the output binding depends on the version of your Node.js model. For more information, including links to example binding code that you can refer to, see [Add bindings to a function](../articles/azure-functions/add-bindings-existing-function.md?tabs=javascript#manually-add-bindings-based-on-examples).
@@ -74,13 +74,15 @@ For more information, including links to example binding code that you can refer
7474
The way you define the output binding depends on the version of your Python model. For more information, including links to example binding code that you can refer to, see [Add bindings to a function](../articles/azure-functions/add-bindings-existing-function.md?tabs=python#manually-add-bindings-based-on-examples).
7575
::: zone-end
7676
::: zone pivot="programming-language-typescript"
77-
### [v3](#tab/node-v3)
78-
:::code language="json" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli/HttpExample/function.json" highlight="18-24":::
79-
8077
### [v4](#tab/node-v4)
8178

8279
Example binding for Node.js model v4 not yet available.
8380

81+
### [v3](#tab/node-v3)
82+
83+
:::code language="json" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli/HttpExample/function.json" highlight="18-24":::
84+
8485
---
86+
8587
The way you define the output binding depends on the version of your Node.js model. For more information, including links to example binding code that you can refer to, see [Add bindings to a function](../articles/azure-functions/add-bindings-existing-function.md?tabs=typescript#manually-add-bindings-based-on-examples).
86-
::: zone-end
88+
::: zone-end

0 commit comments

Comments
 (0)