Note: information on this page refers to Ceylon 1.1, not to the current release.
<ceylon-run-js>
Ant task
Usage
Note: You must declare the tasks with a <typedef>
.
This task runs a top-level JavaScript method compiled from Ceylon code. It requires node.js to run the generated JS code.
To execute the com.example.foo::start
top level method in
version 1.1 of module com.example.foo
residing
in the build
directory (repository):
<target name="execute" depends="ceylon-ant-taskdefs">
<ceylon-run-js run="start"
module="com.example.foo/1.1">
<rep url="build"/>
</ceylon-run-js>
</target>
Description
The <ceylon-run-js>
ant task supports execution of Ceylon modules, top-level classes
and top-level functions compiled to JavaScript,
from a Ceylon repository using the Ant build tool.
It provides similar features to the ceylon run-js
command line tool.
Parameters
Attribute | Description | Required |
---|---|---|
module |
The module (and, optionally, the version) to execute. Ex: `com.foo`, `com.foo/1.2`. | Yes |
run |
The top level class of function to run. If unspecified, a value of "run" is used. | No |
nodePath |
The filesystem location of the node command line tool.
If not specified it is searched in the standard executable path. |
No |
Nested elements
<moduleset>
A reference to a <moduleset>
defined elsewhere in the
ant build file.
<module>
A module to compile. Can be specified multiple times.
Attribute | Description | Required |
---|---|---|
name |
The module name | Yes |
version |
The module version. If no version identifier is specified for a module, the module is assumed to exist in a source directory. | No |
<rep>
A module repository containing the module and/or dependencies. Can be specified multiple times.
Defaults to modules
.
Attribute | Description | Required |
---|---|---|
url |
The URL of the module repository | Yes |