This repository was archived by the owner on Nov 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Defining a script
Tim Seckinger edited this page Dec 20, 2016
·
9 revisions
You can pass an inline script to the script macro as follows:
script("language:source")language can be either a language name or mime type, see Languages.
source is your script’s source code.
Examples:
script("groovy:Math.max(2, 4)")
script("application/javascript:21 * 2")If you pass a valid file path to the script macro, the script’s source code will be read from the file.
You can use absolute file paths or file paths relative to your home directory.
Examples:
script("myscripts/abc.js")
script("/tmp/script.js")If the file name has a known extension (see Languages), the script language will be inferred from the extension.
If the file name does not have a known extension (or you need to override the language for some reason), you can specify the language followed by a colon before the file path:
script("language:path")Examples:
script("javascript:myscripts/abc")
script("application/x-groovy:/tmp/script.js")TODO
TODO