Conversation
client/js/item.coffee
Outdated
There was a problem hiding this comment.
Looking through this now (relearning CoffeeScript 😄), why no "type" variable?
There was a problem hiding this comment.
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.
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
coffeescriptbranch.