ng-planetaryjs looks for global with AMD loader

While using RequireJS to AMD load ng-planetaryjs, planetaryjs, and their dependencies, ng-planetaryjs still looks for global object planetaryjs (such as in ```var globe = planetaryjs.planet();```). Thus use the UMD pattern "AMD with global, Node, or global" instead of "AMD, Node, or browser global" from https://sublime.wbond.net/packages/UMD%20snippets .
This commit is contained in:
Rolf Sommerhalder 2014-04-27 07:29:42 +02:00
parent c86479db1f
commit 324fed9b3c

4
dist/planetaryjs.js vendored
View File

@ -6,7 +6,9 @@
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(['d3', 'topojson'], factory);
define(['d3', 'topojson'], function(d3, topojson) {
return (root.planetaryjs = factory(d3, topojson));
});
} else if (typeof exports === 'object') {
module.exports = factory(require('d3'), require('topojson'));
} else {