Includes The #include directive includes one Node.js source file within another.
Parameters
1. File path - Path to Node.js source file to include. The included source file may contain other compile directives, such as additional #include lines.
The syntax for the #include directive is as follows:
Code Block | ||
---|---|---|
| ||
#include file-name |
The file name can optionally be qualified with a directory name, otherwise the pathlist is used to locate the file.
Examples
Code Block | ||||
---|---|---|---|---|
| ||||
// Included file is qrpglesrc/copy.js in the pathlist pjs.include("qrpglesrc#include copy.js // Included file is mylib/copy.js"); |
Exception Handling
...
in the 'modules' directory
#include mylib/copy.js |
RPG Equivalent
/COPY, /INCLUDE