Skip to content
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

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

[WIP] Conversion to Coffeescript #124

wants to merge 15 commits into from

Conversation

Aaron1011
Copy link
Member

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.

super id, kind

@itemKind = Types.getKindAsString kind
@wasDropped = false

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?

Copy link
Member Author

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).

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. 😦

Aaron1011 and others added 5 commits September 8, 2013 10:45
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
@justinclift
Copy link

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?

@Aaron1011
Copy link
Member Author

@justinclift: You just need to modify the .travis.yml. I'll do it now.

@justinclift
Copy link

Thanks. Being that you're a Travis-CI contributor, you're a lot better at Travis than me. 😃

@Aaron1011
Copy link
Member Author

@justinclift: Okay, done.

@justinclift
Copy link

Thanks Aaron. 😄

@knownasilya
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants