Skip to content

Commit

Permalink
Fixed an issue with node and nw.js support
Browse files Browse the repository at this point in the history
  • Loading branch information
viskin committed May 29, 2015
1 parent 63a5962 commit a49816a
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 12 deletions.
6 changes: 4 additions & 2 deletions MarkerWithGhost.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global define,module,require,google */
/* global define,module,require */

(function (root, factory) {
'use strict';
Expand All @@ -7,7 +7,7 @@
define(['jquery', 'SlidingMarker'], factory.bind(null, root));
} else if (typeof module !== "undefined" && module !== null && module.exports != null) { // jshint ignore:line
// Node module.
module.exports.MarkerWithGhost = factory(root, require('jquery'), require('SlidingMarker'));
module.exports = factory(window, require('jquery'), require('SlidingMarker'));
} else {
// Browser globals
root.MarkerWithGhost = factory(root, root.jQuery, root.SlidingMarker);
Expand All @@ -16,6 +16,8 @@
function (root, $, SlidingMarker) {
'use strict';

var google = root.google;

//Let jQuery be soft dependency
$ = $ || {};
$.extend = $.extend || function extend(obj) {
Expand Down
6 changes: 4 additions & 2 deletions SlidingMarker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global define,module,require,google */
/* global define,module,require */

(function (root, factory) {
'use strict';
Expand All @@ -7,7 +7,7 @@
define(['jquery', 'markerAnimate'], factory.bind(null, root));
} else if (typeof module !== "undefined" && module !== null && module.exports != null) { // jshint ignore:line
// Node module.
module.exports.SlidingMarker = factory(root, require('jquery'));
module.exports = factory(window, require('jquery'));
} else {
// Browser globals
root.SlidingMarker = factory(root, root.jQuery);
Expand All @@ -16,6 +16,8 @@
function (root, $) {
'use strict';

var google = root.google;

//Let jQuery be soft dependency
$ = $ || {};
$.extend = $.extend || function extend(obj) {
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "marker-animate-unobtrusive",
"main": "SlidingMarker.js",
"version": "0.2.2",
"version": "0.2.3",
"description": "Unobtrusive Google Maps animated marker",

"homepage": "https://github.com/terikon/marker-animate-unobtrusive",
Expand Down
4 changes: 2 additions & 2 deletions dist/MarkerWithGhost.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/MarkerWithGhost.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/SlidingMarker.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a49816a

Please sign in to comment.