From 324fed9b3c56e0cec7e6fa150fb779355eb3c47f Mon Sep 17 00:00:00 2001 From: Rolf Sommerhalder Date: Sun, 27 Apr 2014 07:29:42 +0200 Subject: [PATCH 1/2] 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 . --- dist/planetaryjs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dist/planetaryjs.js b/dist/planetaryjs.js index 86d7aea..a8ccbf1 100644 --- a/dist/planetaryjs.js +++ b/dist/planetaryjs.js @@ -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 { From 9f928dcd7713e1b9a9a5c3227911db67889a8485 Mon Sep 17 00:00:00 2001 From: Rolf Sommerhalder Date: Sun, 27 Apr 2014 10:49:21 +0200 Subject: [PATCH 2/2] bump minor revision --- dist/planetaryjs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/planetaryjs.js b/dist/planetaryjs.js index a8ccbf1..f75f6e3 100644 --- a/dist/planetaryjs.js +++ b/dist/planetaryjs.js @@ -1,4 +1,4 @@ -/*! Planetary.js v1.1.0 +/*! Planetary.js v1.1.1 * Copyright (c) 2013 Brandon Tilley * * Released under the MIT license