Framework-agnostic(ish) generator for Backbone.js things
Go to file
John Bintz d7a77e672b update some templates 2011-05-09 21:47:00 -04:00
autotest initial commit 2011-04-15 14:55:37 -04:00
bin clean up mistakes 2011-05-09 07:35:37 -04:00
lib initial commit 2011-04-15 14:55:37 -04:00
spec add coffeescript 2011-05-08 22:44:21 -04:00
templates update some templates 2011-05-09 21:47:00 -04:00
.autotest add app helper 2011-04-23 19:02:33 -04:00
.gitignore initial commit 2011-04-15 14:55:37 -04:00
Gemfile initial commit 2011-04-15 14:55:37 -04:00
README.md update readme 2011-04-16 11:56:03 -04:00
Rakefile initial commit 2011-04-15 14:55:37 -04:00
backbone-generator.gemspec initial commit 2011-04-15 14:55:37 -04:00

README.md

Not done yet!

Currently only works with Rails-ish projects and with Jasmine & Jammit. I'm selfish.

Models

backbone-generate model Admin::User creates an AdminUserModel object in:

  • public/javascripts/models/admin/user.js
  • spec/javascripts/models/admin/user_spec.js

View

backbone-generate view Admin::User creates an AdminUserView object in:

  • public/javascripts/views/admin/user_view.js
  • spec/javascripts/views/admin/user_view_spec.js
  • app/views/admin/users/view.jst

Collection

backbone-generate collection Admin::User creates an AdminUsersCollection object in:

  • public/javascripts/collections/admin/users.js
  • spec/javascripts/collections/admin/users_spec.js

Collection View

backbone-generate collection-view Admin::User creates an AdminUsersView object in:

  • public/javascripts/views/admin/users_view.js
  • spec/javascripts/views/admin/users_view_spec.js
  • app/views/admin/users/list.jst

Generate everything with backbone-generate scaffold Admin::User.