Resource
Resources are files that support the component. The first resource should be a script that will be executed when the component is run. Additional resources will be copied to the same directory.
Common properties:
- type:
file
/r_script
/python_script
/bash_script
/javascript_script
/scala_script
/csharp_script
, specifies the type of the resource. The first resource cannot be of typefile
. When the type is not specified, the default type is simplyfile
. - dest: filename, the resulting name of the resource. From within a script, the file can be accessed at
meta["resources_dir"] + "/" + dest
. If unspecified,dest
will be set to the basename of thepath
parameter. - path:
path/to/file
, the path of the input file. Can be a relative or an absolute path, or a URI. Mutually exclusive withtext
. - text: …multiline text…, the content of the resulting file specified as a string. Mutually exclusive with
path
. - is_executable:
true
/false
, whether the resulting resource file should be made executable.
Example:
resources:
- type: r_script
path: script.R
- type: file
path: resource1.txt