Note: information on this page refers to Ceylon 1.0, not to the current release.

<ceylon-run-js> Ant task


Note: In M5 the <ceylonjs> task was renamed <ceylon-run-js>.

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 top level method in version 1.1 of module residing in the build directory (repository):

<target name="execute" depends="ceylon-ant-taskdefs">
  <ceylon-run-js run="start"
    <rep url="build"/>


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.


Attribute Description Required
module The module (and, optionally, the version) to execute. Ex: ``, ``. 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


A reference to a <moduleset> defined elsewhere in the ant build file.


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


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

See also