├── bin ├── compiler.jar ├── yuicompressor-2.4.2.jar └── capt ├── templates ├── templates │ └── template.eco ├── models │ ├── model.coffee │ └── spec.coffee ├── collection │ ├── collection.coffee │ └── spec.coffee ├── views │ ├── view.coffee │ └── spec.coffee ├── routers │ ├── application.coffee │ ├── router.coffee │ └── spec.coffee ├── config.yml ├── html │ ├── index.jst │ └── runner.jst └── lib │ ├── jasmine.css │ ├── jasmine-html.js │ └── underscore.js ├── package.json ├── readme.md ├── lib ├── request.js ├── yaml.js ├── router.js ├── parseopt.js └── underscore.js └── src ├── main.coffee └── project.coffee /bin/compiler.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnolan/capt/HEAD/bin/compiler.jar -------------------------------------------------------------------------------- /templates/templates/template.eco: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bin/yuicompressor-2.4.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnolan/capt/HEAD/bin/yuicompressor-2.4.2.jar -------------------------------------------------------------------------------- /bin/capt: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | root = __dirname + "/.." 4 | 5 | require("coffee-script") 6 | require(root + "/src/main.coffee") 7 | -------------------------------------------------------------------------------- /templates/models/model.coffee: -------------------------------------------------------------------------------- 1 | class <%= model.capitalize() %> extends Backbone.Model 2 | initialize: -> 3 | # ... 4 | 5 | @<%= model.capitalize() %> = <%= model.capitalize() %> 6 | -------------------------------------------------------------------------------- /templates/collection/collection.coffee: -------------------------------------------------------------------------------- 1 | class <%= model.capitalize() %>Collection extends Backbone.Collection 2 | model: <%= model.capitalize() %> 3 | 4 | @<%= model.capitalize() %>Collection = <%= model.capitalize() %>Collection 5 | -------------------------------------------------------------------------------- /templates/views/view.coffee: -------------------------------------------------------------------------------- 1 | class <%= router.capitalize() %><%= view.capitalize() %>View extends Backbone.View 2 | initialize: -> 3 | 4 | render: -> 5 | $(@el).html("blah!") 6 | 7 | @<%= router.capitalize() %><%= view.capitalize() %>View = <%= router.capitalize() %><%= view.capitalize() %>View 8 | -------------------------------------------------------------------------------- /templates/routers/application.coffee: -------------------------------------------------------------------------------- 1 | class Application 2 | constructor: -> 3 | 4 | start: -> 5 | console.log 'App started' 6 | 7 | # Create your controllers here... 8 | 9 | # Then start backbone 10 | # Backbone.history.start() 11 | 12 | 13 | @Application = Application 14 | -------------------------------------------------------------------------------- /templates/routers/router.coffee: -------------------------------------------------------------------------------- 1 | class <%= router.capitalize() %>Router extends Backbone.Router 2 | routes : 3 | "<%= router %>/:id/edit" : "edit" 4 | "<%= router %>/new" : "new" 5 | "<%= router %>/:id" : "show" 6 | "<%= router %>" : "index" 7 | 8 | index: -> 9 | # new <%= router.capitalize() %>IndexView 10 | 11 | @<%= router.capitalize() %>Router = <%= router.capitalize() %>Router 12 | -------------------------------------------------------------------------------- /templates/models/spec.coffee: -------------------------------------------------------------------------------- 1 | describe '<%= model %> model', -> 2 | 3 | it 'should handle the truth', -> 4 | expect(true).toBeTruthy() 5 | 6 | it 'should exist', -> 7 | expect(<%= model.capitalize() %>).toBeTruthy() 8 | 9 | it 'should instantiate', -> 10 | x = new <%= model.capitalize() %> 11 | expect(x instanceof <%= model.capitalize() %>).toBeTruthy() 12 | expect(x instanceof Backbone.Model).toBeTruthy() 13 | 14 | -------------------------------------------------------------------------------- /templates/config.yml: -------------------------------------------------------------------------------- 1 | 2 | javascripts: 3 | - 'lib/jquery.js' 4 | - 'lib/underscore.js' 5 | - 'lib/backbone.js' 6 | - 'app/controllers/*.coffee' 7 | - 'app/views/**/*.coffee' 8 | - 'app/models/*.coffee' 9 | 10 | stylesheets: 11 | - 'public/stylesheets/*.less' 12 | 13 | specs: 14 | - 'spec/*/*.coffee' 15 | - 'spec/views/*/*.coffee' 16 | 17 | fixtures: 18 | 19 | templates: 20 | - 'app/templates/*.eco' 21 | - 'app/templates/*/*.eco' -------------------------------------------------------------------------------- /templates/html/index.jst: -------------------------------------------------------------------------------- 1 | 2 | 3 |