Skip to content

Commit 2dc9f34

Browse files
committed
Use custom-functions.js instead of functions.js
1 parent 5851a62 commit 2dc9f34

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/topics/expressions.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ Entries added to the `expressionLib` attribute are parsed with the JavaScript en
149149
of the CWL Runner. This can be used to include external files or to create JavaScript
150150
functions that can be called in other parts of the CWL document.
151151

152-
For example, we can write a JavaScript function to an external file `functions.js`:
152+
For example, we can write a JavaScript function to an external file `custom-functions.js`:
153153

154-
```{literalinclude} /_includes/cwl/functions.js
154+
```{literalinclude} /_includes/cwl/custom-functions.js
155155
:language: javascript
156-
:caption: "`functions.js`"
157-
:name: "`functions.js`"
156+
:caption: "`custom-functions.js`"
157+
:name: "`custom-functions.js`"
158158
```
159159

160-
The following CWL document includes the `functions.js` file, and uses the function
160+
The following CWL document includes the `custom-functions.js` file, and uses the function
161161
`capitalizeWords`:
162162

163163
```{literalinclude} /_includes/cwl/hello-world-expressionlib.cwl
@@ -170,12 +170,12 @@ The following CWL document includes the `functions.js` file, and uses the functi
170170
In `expressionLib`, `$include` supports both relative and absolute paths.
171171
```
172172

173-
The `functions.js` file is included in the CWL document with the `$include: functions.js`
173+
The `custom-functions.js` file is included in the CWL document with the `$include: custom-functions.js`
174174
statement. That makes the functions and variables available to be used in other parts of
175175
the CWL document.
176176

177177
In another entry to the `expressionLib` attribute we then create another function,
178-
`createHelloWorldMessage`, that calls the `capitalizeWords` from `functions.js`. This
178+
`createHelloWorldMessage`, that calls the `capitalizeWords` from `custom-functions.js`. This
179179
is just to show that you can either include external JavaScript files, or define
180180
inline functions in your CWL document.
181181

0 commit comments

Comments
 (0)