This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define({ | |
load: function(name, req, onLoad, config) { | |
'use strict'; | |
if(config.isBuild) { onLoad(null); } // prevent errors w/ synchronous optimizer | |
else { | |
req([name], function(BackboneClass) { | |
var obj = new BackboneClass(); | |
obj.fetch({ | |
success: function(instance) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global define*/ | |
/** | |
* Backbone.Promise - You'll tell me when you're ready, won't you? | |
* | |
* Let's create a collection that immediately fetches itself upon | |
* instantiation, and provide a promise for the completion of said fetch. | |
* | |
* Why? Because why not? | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global define*/ | |
/** | |
* Backbone.Maid - Someone's gotta clean up after your mess | |
* | |
* An attempt to write a(n admittedly opinionated) version | |
* of Backbone.View that better manages sub-views | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* PropAddr | |
*/ | |
var PropAddr = function(obj) { | |
var props = [], | |
i; | |
if(arguments.length === 2) { | |
props = arguments[1].split('.'); | |
} else { | |
props = Array.prototype.slice.call(arguments, 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"maintainerCounts": [ | |
{ | |
"maintainer": "nj48", | |
"count": 230 | |
}, | |
{ | |
"maintainer": "kazmer", | |
"count": 8 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
let _ = require('lodash'); | |
let Promise = require('bluebird'); | |
let request = Promise.promisify(require('request')); | |
let pkg_list = 'https://gist.githubusercontent.com/azer/db27417ee84b5f34a6ea/raw/50ab7ef26dbde2d4ea52318a3590af78b2a21162/gistfile1.txt'; | |
let registry = 'http://registry.npmjs.org/'; | |
function processPkgs(pkgs) { | |
let data = { | |
maintainerCounts: [], |