backbone-generator/README.md

37 lines
1021 B
Markdown
Raw Normal View History

2011-04-15 19:02:36 +00:00
*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:
2011-04-15 20:00:25 +00:00
* `public/javascripts/models/admin/user.js`
* `spec/javascripts/models/admin/user_spec.js`
2011-04-15 19:02:36 +00:00
### View
`backbone-generate view Admin::User` creates an AdminUserView object in:
2011-04-15 19:58:47 +00:00
* `public/javascripts/views/admin/user_view.js`
* `spec/javascripts/views/admin/user_view_spec.js`
2011-04-16 15:56:03 +00:00
* `app/views/admin/users/view.jst`
2011-04-15 19:02:36 +00:00
### Collection
`backbone-generate collection Admin::User` creates an AdminUsersCollection object in:
2011-04-15 20:15:51 +00:00
* `public/javascripts/collections/admin/users.js`
* `spec/javascripts/collections/admin/users_spec.js`
2011-04-15 19:02:36 +00:00
2011-04-15 19:52:27 +00:00
### Collection View
`backbone-generate collection-view Admin::User` creates an AdminUsersView object in:
2011-04-15 19:58:47 +00:00
* `public/javascripts/views/admin/users_view.js`
* `spec/javascripts/views/admin/users_view_spec.js`
2011-04-16 15:56:03 +00:00
* `app/views/admin/users/list.jst`
2011-04-15 19:52:27 +00:00
2011-04-16 00:43:48 +00:00
Generate everything with `backbone-generate scaffold Admin::User`.
2011-04-15 19:02:36 +00:00