Skip to content

Conversation

sinisterchipmunk
Copy link

This pull requests adds support for generating pure JavaScript code instead of CoffeeScript code. It also removes the hard dependency on CoffeeScript, allowing Rails apps to make use of this gem without requiring CoffeeScript as a dependency. (For my own case, this also allows me to use a version of CoffeeScript that this project's gemspec would otherwise prohibit.)

The generators can produce pure JavaScript by explicitly passing --javascript, or implicitly by simply omitting CoffeeScript from the Gemfile.

This pull request addresses #46. It also adds a pure JavaScript component to the demo.

It is thoroughly tested.

…cript

also included a pure-javascript demo component
also regenerated demo with new files
@kshahkshah
Copy link

@sinisterchipmunk work was no longer merging due to a minor conflict, I've merged his work with the latest master it's available here

https://github.com/whistlerbrk/backbone-rails/

@kshahkshah
Copy link

Except my merge isn't working, and I'm uncertain why -- I have just started using Backbone

The problem appears to be within the index_view at this call:

this.options.MODEL_NAME.bind('reset', this.addAll);

However, it's not the real problem. Inspect this object vs master (vanilla) the object is not subclassing properly. I think some CoffeeScript magic isn't getting triggered

@davidahopp
Copy link

Bump!! Any hope of getting this added to the project?

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.

4 participants