paulmillr/brunch-with-chaplin — pull request #61 by akre54 (2013-03-10 20:01:36+00:00)
Title: Scaffold generator

For quick demonstrations of Brunch's usefulness, the best example is definitely the generator: `brunch g model post`, `brunch g collection post`, etc. It would be great if there were also an easy way to quickly generate the full scaffolding for a resource (controller, model, view, collection-view, and all) in one command a la rails.

```
$ brunch g scaffold post

info: create test/controllers/post-controller-test.coffee
info: create app/controllers/post-controller.coffee
info: create test/models/post-test.coffee
info: create app/models/post.coffee
info: create test/models/posts-test.coffee
info: create app/models/posts.coffee
info: create test/views/post-item-view-test.coffee
info: create app/views/post-item-view.coffee
info: create app/views/styles/post-item.styl
info: create app/views/templates/post-item.hbs
info: create test/views/post-page-view-test.coffee
info: create app/views/post-page-view.coffee
info: create app/views/styles/post-page.styl
info: create app/views/templates/post-page.hbs
info: create test/views/posts-view-test.coffee
info: create app/views/posts-view.coffee
info: create app/views/styles/posts.styl
info: create app/views/templates/posts.hbs
```

I need to do some more digging into the brunch source code, but atm distinction between collection-view, item-view and page-view is busted. Any insights @paulmillr?

Would also be great to find a way to update the routes.coffee file and the generated controller to add index and show routes automatically.