├── .gitignore ├── Cakefile ├── README.md ├── app ├── application.coffee ├── assets │ ├── images │ │ └── destroy.png │ └── index.html ├── initialize.coffee ├── lib │ ├── router.coffee │ └── view_helper.coffee ├── models │ ├── collection.coffee │ ├── model.coffee │ ├── todo.coffee │ └── todos.coffee └── views │ ├── home_view.coffee │ ├── new_todo_view.coffee │ ├── stats_view.coffee │ ├── styles │ └── application.styl │ ├── templates │ ├── home.hbs │ ├── new_todo.hbs │ ├── stats.hbs │ ├── todo.hbs │ └── todos.hbs │ ├── todo_view.coffee │ ├── todos_view.coffee │ ├── user.coffee │ └── view.coffee ├── config.coffee ├── package.json ├── public ├── images │ └── destroy.png ├── index.html ├── javascripts │ ├── app.js │ └── vendor.js └── stylesheets │ └── app.css ├── test ├── functional │ └── app.coffee8 ├── helpers.coffee ├── index.html ├── mocha.css ├── mocha.js └── unit │ ├── collections │ └── todo_list.coffee │ ├── models │ └── todo.coffee │ ├── routers │ └── main.coffee │ └── views │ ├── home.coffee │ ├── new_todo.coffee │ ├── stats.coffee │ ├── todo.coffee │ ├── todos.coffee │ └── user.coffee └── vendor └── scripts ├── backbone-0.9.2.js ├── backbone.localStorage.js ├── console-helper.js ├── jquery-1.7.2.js └── underscore-1.3.1.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Numerous always-ignore extensions 2 | *.diff 3 | *.err 4 | *.orig 5 | *.log 6 | *.rej 7 | *.swo 8 | *.swp 9 | *.vi 10 | *~ 11 | *.sass-cache 12 | 13 | # OS or Editor folders 14 | .DS_Store 15 | .cache 16 | .project 17 | .settings 18 | .tmproj 19 | nbproject 20 | Thumbs.db 21 | 22 | # NPM packages folder. 23 | node_modules/ 24 | 25 | # Brunch folder for temporary files. 26 | tmp/ 27 | -------------------------------------------------------------------------------- /Cakefile: -------------------------------------------------------------------------------- 1 | sys = require 'sys' 2 | {spawn} = require 'child_process' 3 | 4 | task 'test', 'Run all unit, integration and functional tests', -> 5 | task 'test:functionals', 'Run functional tests', -> 6 | task 'test:integration', 'Run integration tests', -> 7 | task 'test:units', 'Run unit tests', -> 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Todos 2 | 3 | **Deprecated!** Use [todomvc chaplin-brunch](https://github.com/addyosmani/todomvc/tree/gh-pages/labs/dependency-examples/chaplin-brunch) instead. 4 | 5 | This is a rewrite of Todos (Backbone's example application). We rewrote it to provide a simple and complete brunch example. Special thanks to [Jérôme Gravel-Niquet](http://jgn.me/) for his groundwork. 6 | 7 | ## Development 8 | 9 | Use `brunch build` or `brunch watch` to compile changes in src folder. 10 | Usually we don't track the js/css files in our repositories, but decided to keep them here because we hope it would be easier to start using it. 11 | -------------------------------------------------------------------------------- /app/application.coffee: -------------------------------------------------------------------------------- 1 | # The application bootstrapper. 2 | Application = 3 | initialize: -> 4 | Todos = require 'models/todos' 5 | Router = require 'lib/router' 6 | HomeView = require 'views/home_view' 7 | NewTodoView = require 'views/new_todo_view' 8 | StatsView = require 'views/stats_view' 9 | TodoView = require 'views/todo_view' 10 | TodosView = require 'views/todos_view' 11 | 12 | # Ideally, initialized classes should be kept in controllers & mediator. 13 | # If you're making big webapp, here's more sophisticated skeleton 14 | # https://github.com/paulmillr/brunch-with-chaplin 15 | @todos = new Todos() 16 | 17 | @homeView = new HomeView() 18 | @statsView = new StatsView() 19 | @newTodoView = new NewTodoView() 20 | @todosView = new TodosView() 21 | 22 | # Instantiate the router 23 | @router = new Router() 24 | # Freeze the object 25 | Object.freeze? Application 26 | 27 | module.exports = Application 28 | -------------------------------------------------------------------------------- /app/assets/images/destroy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunch/todos/ae93e8a61786de4f6f8ad2f57967eb4898d2fe6d/app/assets/images/destroy.png -------------------------------------------------------------------------------- /app/assets/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | 8 | 9 |