Permalink
Browse files

deleting junk lib folder

  • Loading branch information...
1 parent bfe09b5 commit 0baf46d313cc014140876a42ebc0a2f7ea77bc37 @derickbailey derickbailey committed Sep 27, 2012
Showing with 0 additions and 240 deletions.
  1. +0 −125 lib/amd/backbone.wreqr.js
  2. +0 −5 lib/amd/backbone.wreqr.min.js
  3. +0 −105 lib/backbone.wreqr.js
  4. +0 −5 lib/backbone.wreqr.min.js
View
@@ -1,125 +0,0 @@
-// Backbone.Wreqr, v0.0.0
-// Copyright (c)2012 Derick Bailey, Muted Solutions, LLC.
-// Distributed under MIT license
-// http://github.com/marionettejs/backbone.wreqr
-(function (root, factory) {
- if (typeof exports === 'object') {
-
- var underscore = require('underscore');
- var backbone = require('backbone');
-
- module.exports = factory(underscore, backbone);
-
- } else if (typeof define === 'function' && define.amd) {
-
- define(['underscore', 'backbone'], factory);
-
- }
-}(this, function (_, Backbone) {
- "option strict";
-
- Backbone.Wreqr = (function(Backbone, Marionette, _){
- "option strict";
- var Wreqr = {};
-
- Wreqr.Handlers = (function(Backbone, _){
- "option strict";
-
- var Handlers = function(){
- "use strict";
- this._handlers = {};
- };
-
- Handlers.extend = Backbone.Model.extend;
-
- _.extend(Handlers.prototype, {
- addHandler: function(name, handler, context){
- var config = {
- callback: handler,
- context: context
- };
-
- this._handlers[name] = config;
- },
-
- getHandler: function(name){
- var config = this._handlers[name];
-
- if (!config){
- throw new Error("Handler not found for '" + name + "'");
- }
-
- return function(){
- return config.callback.apply(config.context, arguments);
- };
- },
-
- removeHandler: function(name){
- delete this._handlers[name];
- },
-
- removeAllHandlers: function(){
- this._handlers = {};
- }
- });
-
- return Handlers;
- })(Backbone, _);
-
- // Wreqr.Commands
- // --------------
- //
- // A simple command pattern implementation. Register a command
- // handler and execute it.
- Wreqr.Commands = (function(Wreqr){
- "option strict";
-
- return Wreqr.Handlers.extend({
- execute: function(name, args){
- this.getHandler(name)(args);
- }
- });
-
- })(Wreqr);
-
- // Wreqr.RequestResponse
- // ---------------------
- //
- // A simple request/response implementation. Register a
- // request handler, and return a response from it
- Wreqr.RequestResponse = (function(Wreqr){
- "option strict";
-
- return Wreqr.Handlers.extend({
- request: function(name, args){
- return this.getHandler(name)(args);
- }
- });
-
- })(Wreqr);
-
- // Event Aggregator
- // ----------------
- // A pub-sub object that can be used to decouple various parts
- // of an application through event-driven architecture.
-
- Wreqr.EventAggregator = (function(Backbone, _){
- "option strict";
- var EA = function(){};
-
- // Copy the `extend` function used by Backbone's classes
- EA.extend = Backbone.Model.extend;
-
- // Copy the basic Backbone.Events on to the event aggregator
- _.extend(EA.prototype, Backbone.Events);
-
- return EA;
- })(Backbone, _);
-
-
- return Wreqr;
- })(Backbone, Backbone.Marionette, _);
-
- return Backbone.Wreqr;
-
-}));

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,105 +0,0 @@
-// Backbone.Wreqr, v0.0.0
-// Copyright (c)2012 Derick Bailey, Muted Solutions, LLC.
-// Distributed under MIT license
-// http://github.com/marionettejs/backbone.wreqr
-Backbone.Wreqr = (function(Backbone, Marionette, _){
- "option strict";
- var Wreqr = {};
-
- Wreqr.Handlers = (function(Backbone, _){
- "option strict";
-
- var Handlers = function(){
- "use strict";
- this._handlers = {};
- };
-
- Handlers.extend = Backbone.Model.extend;
-
- _.extend(Handlers.prototype, {
- addHandler: function(name, handler, context){
- var config = {
- callback: handler,
- context: context
- };
-
- this._handlers[name] = config;
- },
-
- getHandler: function(name){
- var config = this._handlers[name];
-
- if (!config){
- throw new Error("Handler not found for '" + name + "'");
- }
-
- return function(){
- return config.callback.apply(config.context, arguments);
- };
- },
-
- removeHandler: function(name){
- delete this._handlers[name];
- },
-
- removeAllHandlers: function(){
- this._handlers = {};
- }
- });
-
- return Handlers;
- })(Backbone, _);
-
- // Wreqr.Commands
- // --------------
- //
- // A simple command pattern implementation. Register a command
- // handler and execute it.
- Wreqr.Commands = (function(Wreqr){
- "option strict";
-
- return Wreqr.Handlers.extend({
- execute: function(name, args){
- this.getHandler(name)(args);
- }
- });
-
- })(Wreqr);
-
- // Wreqr.RequestResponse
- // ---------------------
- //
- // A simple request/response implementation. Register a
- // request handler, and return a response from it
- Wreqr.RequestResponse = (function(Wreqr){
- "option strict";
-
- return Wreqr.Handlers.extend({
- request: function(name, args){
- return this.getHandler(name)(args);
- }
- });
-
- })(Wreqr);
-
- // Event Aggregator
- // ----------------
- // A pub-sub object that can be used to decouple various parts
- // of an application through event-driven architecture.
-
- Wreqr.EventAggregator = (function(Backbone, _){
- "option strict";
- var EA = function(){};
-
- // Copy the `extend` function used by Backbone's classes
- EA.extend = Backbone.Model.extend;
-
- // Copy the basic Backbone.Events on to the event aggregator
- _.extend(EA.prototype, Backbone.Events);
-
- return EA;
- })(Backbone, _);
-
-
- return Wreqr;
-})(Backbone, Backbone.Marionette, _);

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 0baf46d

Please sign in to comment.