Skip to content

[WIP] Conversion to Coffeescript#124

Open
Aaron1011 wants to merge 15 commits intomasterfrom
coffeescript
Open

[WIP] Conversion to Coffeescript#124
Aaron1011 wants to merge 15 commits intomasterfrom
coffeescript

Conversation

@Aaron1011
Copy link
Copy Markdown
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.

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
Member Author

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

@justinclift
Copy link
Copy Markdown

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

@Aaron1011
Copy link
Copy Markdown
Member Author

@justinclift: Okay, done.

@justinclift
Copy link
Copy Markdown

Thanks Aaron. 😄

@knownasilya
Copy link
Copy Markdown

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