Skip to content

Script's resource


Access to a script’s resources.

A script may have one or more resources of varying types: HTML, XML, XSLT, TypeScript, etc.


Binding name: resource

Method: String get(String resourceName)

Get the named resource as a String.

Method: String getCompiled(String resourceName)

Get the compiled form of the names resource as a String.


Currently only TypeScript compilation is supported. Therefore you can only get the compiled form of resources of type TypeScript.


println resource.getCompiled("MyTypeScript")

println resource.get("MyTypeScript")