{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/5f9ff4124b15a3e235e87ac35784b6e2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5f9ff4124b15a3e235e87ac35784b6e2","url":"https://api.github.com/users/paulmillr","login":"paulmillr","id":574696},"milestone":{"state":"open","open_issues":5,"url":"https://api.github.com/repos/brunch/brunch/milestones/3","due_on":"2011-11-13T08:00:00Z","creator":{"avatar_url":"https://secure.gravatar.com/avatar/5f9ff4124b15a3e235e87ac35784b6e2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5f9ff4124b15a3e235e87ac35784b6e2","url":"https://api.github.com/users/paulmillr","login":"paulmillr","id":574696},"number":3,"title":"0.9","description":"Added growl support\r\nAdded config DSL\r\nAdded jasmine testing of brunch applications\r\nRefactored old code\r\nBetter time format in console logs\r\nSwitched testing engine for the brunch itself from nodeunit to jasmine\r\nRemoved stylus as a default styling plugin. ","closed_issues":9,"created_at":"2011-09-19T09:44:13Z"},"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/5f9ff4124b15a3e235e87ac35784b6e2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5f9ff4124b15a3e235e87ac35784b6e2","url":"https://api.github.com/users/paulmillr","login":"paulmillr","id":574696},"updated_at":"2011-11-09T02:29:10Z","labels":[{"name":"enhancement","color":"02e10c","url":"https://api.github.com/repos/brunch/brunch/labels/enhancement"},{"name":"for discussion","color":"d7e102","url":"https://api.github.com/repos/brunch/brunch/labels/for+discussion"}],"comments":25,"closed_at":null,"url":"https://api.github.com/repos/brunch/brunch/issues/128","body":"All brunch applications need to store imported models / views somewhere. In our TODO example, importing is done by this code:\r\n\r\n```coffeescript\r\n\r\nwindow.app = {}\r\napp.routers = {}\r\napp.models = {}\r\napp.collections = {}\r\napp.views = {}\r\n\r\nTodos = require('collections/todos_collection').Todos\r\nMainRouter = require('routers/main_router').MainRouter\r\nHomeView = require('views/home_view').HomeView\r\nNewTodoView = require('views/new_todo_view').NewTodoView\r\nTodosView = require('views/todos_view').TodosView\r\nStatsView = require('views/stats_view').StatsView\r\nTodoView = require('views/todos_view').TodoView\r\n\r\n# app bootstrapping on document ready\r\n$(document).ready ->\r\n  app.initialize = ->\r\n    app.collections.todos = new Todos()\r\n\r\n    app.routers.main = new MainRouter()\r\n    app.views.home = new HomeView()\r\n    app.views.newTodo = new NewTodoView()\r\n    app.views.todos = new TodosView()\r\n    app.views.stats = new StatsView()\r\n\r\n    Backbone.history.navigate('home', false) if Backbone.history.getFragment() is ''\r\n```\r\n\r\nI think it's extremely verbose. I propose to include a simple BrunchApplication class that would do all work for us. Importing is needed by all brunch apps, so I guess this would help them a lot.","html_url":"https://github.com/brunch/brunch/issues/128","number":128,"title":"Add application helper","id":1724742,"created_at":"2011-09-23T16:26:05Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/b2a8ac854fcfbf4f3a3a1ea98aadf856?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b2a8ac854fcfbf4f3a3a1ea98aadf856","url":"https://api.github.com/users/ikezue","login":"ikezue","id":38947},"updated_at":"2011-11-09T02:29:10Z","url":"https://api.github.com/repos/brunch/brunch/issues/comments/2676786","body":"@paulmillr I hadn't thought about different builds for different applications.  Yes, I could rename the 'build' directory to 'public', but I may also need to move things around.  The 'web' directory would be redundant for web apps, unless I've misinterpreted its use.  And in the current version of brunch (installed last weekend) I think index.html is outside the build directory.\r\n\r\nHow about using flags to support multiple application types:\r\n    brunch new app --type=chrome\r\n    brunch new app --type=web\r\n\r\nOr specifying a target in config.yaml, or at the command line:\r\n    brunch build --target chrome\r\n\r\nJust wanted to suggest these options, I'm happy to work around whatever is most convenient for others.\r\n\r\nRe: images\r\nI think Rails just copies assets/images/* over to public/images.  I guess a similar pattern could work, copying some_dir/images/ over to build/images/.\r\n\r\nI don't much about Django or other web frameworks, but Rails 3.1 solves some of these same problems.  It makes sense to steal a few ideas from them.\r\n\r\nThanks for responding, and your work.","id":2676786,"created_at":"2011-11-09T02:29:10Z"}}