Skip to content
Browse files

Updates to export necessary items

  • Loading branch information...
1 parent 3d18cc8 commit d1606fdd47699bbef1f9397095b3f5eefa5b1dcc @jawsthegame jawsthegame committed
Showing with 74 additions and 66 deletions.
  1. +1 −1 Makefile
  2. +0 −43 app/index.coffee
  3. +2 −1 app/views/navigation_view.coffee
  4. +27 −14 package.json
  5. +43 −0 quips.coffee
  6. +0 −5 slug.json
  7. +1 −2 test/setup.coffee
View
2 Makefile
@@ -33,7 +33,7 @@ update:
@npm install
tags:
- @ctags -R app
+ @ctags -R .
deploy:
@rm -f ./public/application.*
View
43 app/index.coffee
@@ -1,43 +0,0 @@
-$ = require 'jqueryify2'
-datepicker = require 'lib/jquery-ui-1.8.22.datepicker-only.min'
-Backbone = require 'backbone'
-
-loadModel = require 'models/loader'
-
-NavigationController = require 'controllers/navigation_controller'
-TabView = require 'views/tab_view'
-
-
-class App
-
- # Create the applicatoin with the given API root. All AJAX requests will be
- # made relative to this root. If omitted, the application will run as if it
- # was being served from / on the same host as the API.
- constructor: (@apiRoot) ->
- module.exports.apiRoot = @apiRoot
-
- root = $('body')
- @loginController = new LoginController(el: root)
-
- (do @login)
- .pipe(@loadModel)
- .pipe(@showUI)
-
- login: =>
- User.authenticateAgainst(@apiRoot)
- @loginController.login()
-
- loadModel: =>
- $('body').text('loading...')
- loadModel(@apiRoot)
-
- showUI: (model) =>
- layout = $('body').empty().append(require 'templates/layout')
-
- main = layout.find('.body')
- navigation = layout.find('.navigation')
-
- Backbone.history.start()
-
-
-module.exports.app = App
View
3 app/views/navigation_view.coffee
@@ -3,7 +3,8 @@ View = require 'views/view'
class NavigationView extends View
- template: require 'templates/navigation'
+ template: ->
+ throw 'Must override template'
events:
'click ul.primary a': 'clickPrimary'
View
41 package.json
@@ -1,19 +1,32 @@
{
- "name": "vistar-selling",
+ "name": "quips",
"version": "0.0.1",
"dependencies": {
- "coffee-script": "~1.3.3",
- "hem": "~0.1.9",
- "jqueryify2": "0.0.1",
- "json2ify": "~0.0.1",
- "underscore": ">=1.3.1",
- "backbone": "~0.9.2",
- "haml-coffee": "1.4.1",
- "hem-haml-coffee": "0.0.3",
-
- "jsdom": "~0.2.15",
- "mocha": "1.3.2",
- "chai": "1.2.0",
- "fs-extra": "0.1.3"
+ "coffee-script": "~1.3.3",
+ "jqueryify2": "0.0.1",
+ "json2ify": "~0.0.1",
+ "underscore": ">=1.3.1",
+ "backbone": "~0.9.2",
+ "haml-coffee": "1.4.1",
+ "hem-haml-coffee": "0.0.3",
+ "jsdom": "~0.2.15",
+ "mocha": "1.3.2",
+ "chai": "1.2.0",
+ "fs-extra": "0.1.3"
+ },
+ "devDependencies": {},
+ "optionalDependencies": {},
+ "engines": {
+ "node": "*"
+ },
+ "author": "Vistar Media (http://www.vistarmedia.com)",
+ "description": "a leak-plugging layer on top of backbone.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/vistarmedia/quips.git"
+ },
+ "main": "./quips",
+ "scripts": {
+ "test": "make test"
}
}
View
43 quips.coffee
@@ -0,0 +1,43 @@
+module.exports =
+ # Models
+ Model = require 'models/model'
+ Loader = require 'models/loader'
+ User = require 'models/user'
+
+ # Collections
+ Collection = require 'models/collection'
+ FilteredCollection = require 'models/filtered_collection'
+
+ # Views
+ View = require 'views/view'
+ DetailView = require 'views/detail_view'
+ ListView = require('views/list_view').ListView
+ LoginView = require 'views/login/login_view'
+ NavigationView = require 'views/navigation_view'
+ NoticeView = require 'views.notice_view'
+ RowView = require('views/list_view').RowView
+ SearchView = require 'views/search_view'
+ TabView = require 'views/tab_view'
+
+ # Controllers
+ Controller = require 'controllers/controller'
+ FormController = require 'controllers/form_controller'
+ LoginController = require 'controllers/login_controller'
+ NavigationController = require 'controllers/navigation_controller'
+
+ # Forms
+ FormView = require('lib/forms').FormView
+ stringField = require('lib/forms').stringField
+ intField = require('lib/forms').intField
+ moneyField = require('lib/forms').moneyField
+ boolField = require('lib/forms').boolField
+ dateField = require('lib/forms').stringField
+ dateTimeField = require('lib/forms').dateTimeField
+
+ # Formatters
+ formatters =
+ date: require('lib/format').date
+ dateTime: require('lib/format').dateTime
+ boolean: require('lib/format').boolean
+ money: require('lib/format').money
+ number: require('lib/format').number
View
5 slug.json
@@ -6,11 +6,6 @@
"backbone"
],
- "libs": [
- "./lib/js/swfobject.js",
- "./lib/js/swfupload.js"
- ],
-
"compilers": {
"haml": "hem-compiler-haml"
}
View
3 test/setup.coffee
@@ -10,6 +10,7 @@ global.window.confirm = -> true
global.jQuery = require 'jqueryify2'
Backbone = require 'backbone'
+datepicker = require 'lib/jquery-ui-1.8.22.datepicker-only.min'
MockHttpServer = require('./lib/mock_server').MockHttpServer
collectionTypes = require('models/loader').collectionTypes
@@ -69,5 +70,3 @@ module.exports =
unless handed
request.receive 404, 'Not Found'
-
-require('index').apiRoot = ''

0 comments on commit d1606fd

Please sign in to comment.
Something went wrong with that request. Please try again.