cocos2d / cocos2d-html5

Cocos2d for Web Browsers. Built using JavaScript.
https://www.cocos.com
3.06k stars 903 forks source link

coffeescript compatibility? #1008

Open vontio opened 11 years ago

vontio commented 11 years ago

does coffeescript work with cocos2d html5?

dingpinglv commented 11 years ago

No, CoffeeScript doesn't work with cocos2d-html5.

pilwon commented 11 years ago

@vontio You can certainly use coffeescript, livescript or anything you like.

This is only one of many ways but check out Browserify and its Coffeeify plugin.

ungikim commented 11 years ago

i use typescript

layerssss commented 10 years ago

@dingpinglv Currently there won't be any compatibility issue using CoffeeScript with cocos2d-html5, if these kept in mind:

  1. enable --bare flag of coffee compiler, or export user-defined class/variables to global object(window)
  2. when in return-value-sensitive functions, explicitly write returns