diff --git a/examples/hello.coffee b/examples/hello.coffee new file mode 100644 index 0000000..2cb3f19 --- /dev/null +++ b/examples/hello.coffee @@ -0,0 +1,8 @@ +cylon = require('..') + +cylon.robot + work: -> + every 1.second(), -> + Logger.info("hello, human!") + +.start() diff --git a/examples/hello.js b/examples/hello.js index 7f5b81b..616120e 100644 --- a/examples/hello.js +++ b/examples/hello.js @@ -1,11 +1,7 @@ var cylon = require('..'); -// Initialize the robot -var robot = cylon.robot({ +cylon.robot({ work: function() { every((1).second(), function() { Logger.info("hello, human!"); }); } -}); - -// start working -robot.start(); +}).start();