-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Conversion to Coffeescript #124
base: master
Are you sure you want to change the base?
Conversation
super id, kind | ||
|
||
@itemKind = Types.getKindAsString kind | ||
@wasDropped = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking through this now (relearning CoffeeScript 😄), why no "type" variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In CoffeeScript, you can prefix a parameter with @ (in this case type), to have it set as an instance variable. This way, you can avoid an extra line of code (this.type = type
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. 😄 I think my brain is in "slow absorbing mode".
This might take a while. 😦
Some file couldn't be converted, failing with the error 'SyntaxError: Illegal token': * pathfinder.js * infomanager.js * gameclient.js * game.js * entity.js * camera.js
Ugh, it looks like my removal of the original .js is breaking Travis-CI builds. @Aaron1011: Any idea how to disable Travis for the coffeescript branch for now? |
@justinclift: You just need to modify the |
Thanks. Being that you're a Travis-CI contributor, you're a lot better at Travis than me. 😃 |
@justinclift: Okay, done. |
Thanks Aaron. 😄 |
Please no. I would rather spend the effort and update to ES6, which would be more future proof and gives many of the syntactic sugar that CoffeeScript has. By switching to CS, you basically reduce your pool of possible contributors to a very small percentage of what you had before. |
Please don't merge this yet, I'm currently working on converting BrowserQuest to CoffeeScript. Help is welcome, send pull requests to the
coffeescript
branch.