From 103589adae9de621e5ccea89728e3544152e0353 Mon Sep 17 00:00:00 2001 From: viskin Date: Sat, 30 May 2015 12:37:07 +0300 Subject: [PATCH] Renamed dist files to .umd. --- Gruntfile.js | 10 +++++----- dist/markerAnimate.min.js | 4 ---- dist/markerAnimate.min.js.map | 1 - dist/{markerAnimate.js => markerAnimate.umd.js} | 6 +++--- dist/markerAnimate.umd.min.js | 4 ++++ dist/markerAnimate.umd.min.js.map | 1 + package.json | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 dist/markerAnimate.min.js delete mode 100644 dist/markerAnimate.min.js.map rename dist/{markerAnimate.js => markerAnimate.umd.js} (97%) create mode 100644 dist/markerAnimate.umd.min.js create mode 100644 dist/markerAnimate.umd.min.js.map diff --git a/Gruntfile.js b/Gruntfile.js index 4a32702..2b6ef54 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -12,11 +12,11 @@ module.exports = function(grunt) { markerAnimate: { options: { src: 'markerAnimate.js', - dest: 'dist/markerAnimate.js', + dest: 'dist/markerAnimate.umd.js', deps: { 'default': ['jQuery'], - amd: ['jquery', 'jquery.easing'], - cjs: ['jquery', 'jquery.easing'] + amd: ['jquery-easing'], + cjs: ['jquery-easing'] } } } @@ -28,8 +28,8 @@ module.exports = function(grunt) { banner: '/* <%= grunt.task.current.target %> v<%= pkg.version %> <%= grunt.template.today("dd-mm-yyyy") %> Node wrapper for marker-animate (C) 2015 Terikon Software */\n' }, markerAnimate: { - src: 'dist/markerAnimate.js', - dest: 'dist/markerAnimate.min.js' + src: 'dist/markerAnimate.umd.js', + dest: 'dist/markerAnimate.umd.min.js' } }, diff --git a/dist/markerAnimate.min.js b/dist/markerAnimate.min.js deleted file mode 100644 index 6d5ae41..0000000 --- a/dist/markerAnimate.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/* markerAnimate v0.0.1 30-05-2015 Node wrapper for marker-animate (C) 2015 Terikon Software */ - -!function(a,b){"function"==typeof define&&define.amd?define(["jquery","jquery.easing"],function(a,c){return b(a,c)}):"object"==typeof exports?module.exports=b(require("jquery"),require("jquery.easing")):b(jQuery)}(this,function(a){google.maps.Marker.prototype.animateTo=function(b,c){defaultOptions={duration:1e3,easing:"linear",complete:null,startLat:this.getPosition().lat(),startLng:this.getPosition().lng()},c=c||{};for(key in defaultOptions)c[key]=c[key]||defaultOptions[key];if("linear"!=c.easing&&("undefined"==typeof a||!a.easing[c.easing]))throw'"'+c.easing+"\" easing function doesn't exist. Include jQuery and/or the jQuery easing plugin and use the right function name.";window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,window.cancelAnimationFrame=window.cancelAnimationFrame||window.mozCancelAnimationFrame,this._AT={startPosition_lat:c.startLat,startPosition_lng:c.startLng,options:c,newPosition:b};var d=b.lat(),e=b.lng();Math.abs(e-this._AT.startPosition_lng)>180&&(e>this._AT.startPosition_lng?e-=360:e+=360);var f=this.AT_setPositionNoAnimation||this.setPosition,g=function(h,i){var j=(new Date).getTime()-i,k=j/c.duration,l=k;if("linear"!==c.easing&&(l=a.easing[c.easing](k,j,0,1,c.duration)),1>k){var m=new google.maps.LatLng(h._AT.startPosition_lat+(d-h._AT.startPosition_lat)*l,h._AT.startPosition_lng+(e-h._AT.startPosition_lng)*l);f.call(h,m),window.requestAnimationFrame?h._AT.animationHandler=window.requestAnimationFrame(function(){g(h,i)}):h._AT.animationHandler=setTimeout(function(){g(h,i)},17)}else f.call(h,b),"function"==typeof c.complete&&c.complete()};window.cancelAnimationFrame?window.cancelAnimationFrame(this._AT.animationHandler):clearTimeout(this._AT.animationHandler),g(this,(new Date).getTime())},google.maps.Marker.prototype.stopAnimation=function(a){if(this._AT){void 0===a&&(a=!0),window.cancelAnimationFrame?window.cancelAnimationFrame(this._AT.animationHandler):clearTimeout(this._AT.animationHandler);var b=this.AT_setPositionNoAnimation||this.setPosition;a&&b.call(this,this._AT.newPosition);var c=this._AT.options;delete this._AT,"function"==typeof c.complete&&c.complete()}}}); -//# sourceMappingURL=markerAnimate.min.js.map \ No newline at end of file diff --git a/dist/markerAnimate.min.js.map b/dist/markerAnimate.min.js.map deleted file mode 100644 index 6734eed..0000000 --- a/dist/markerAnimate.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"markerAnimate.min.js","sources":["markerAnimate.js"],"names":["root","factory","define","amd","a0","b1","exports","module","require","jQuery","this","google","maps","Marker","prototype","animateTo","newPosition","options","defaultOptions","duration","easing","complete","startLat","getPosition","lat","startLng","lng","key","window","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","cancelAnimationFrame","mozCancelAnimationFrame","_AT","startPosition_lat","startPosition_lng","newPosition_lat","newPosition_lng","Math","abs","setPosition","AT_setPositionNoAnimation","animateStep","marker","startTime","ellapsedTime","Date","getTime","durationRatio","easingDurationRatio","deltaPosition","LatLng","call","animationHandler","setTimeout","clearTimeout","stopAnimation","jumpToEnd","undefined"],"mappings":";;CAAC,SAAUA,EAAMC,GACO,kBAAXC,SAAyBA,OAAOC,IAEzCD,QAAQ,SAAS,iBAAkB,SAAUE,EAAGC,GAC9C,MAAQJ,GAAQG,EAAGC,KAEO,gBAAZC,SAIhBC,OAAOD,QAAUL,EAAQO,QAAQ,UAAUA,QAAQ,kBAEnDP,EAAQQ,SAEVC,KAAM,SAAUD,GAalBE,OAAOC,KAAKC,OAAOC,UAAUC,UAAY,SAASC,EAAaC,GAC7DC,gBACEC,SAAU,IACVC,OAAQ,SACRC,SAAU,KACVC,SAAUZ,KAAKa,cAAcC,MAC7BC,SAAUf,KAAKa,cAAcG,OAE/BT,EAAUA,KAGV,KAAKU,MAAOT,gBACVD,EAAQU,KAAOV,EAAQU,MAAQT,eAAeS,IAIhD,IAAsB,UAAlBV,EAAQG,SACW,mBAAVX,KAA0BA,EAAOW,OAAOH,EAAQG,SACzD,KAAM,IAAMH,EAAQG,OAAS,mHAKjCQ,QAAOC,sBAAwBD,OAAO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GAAKsC,OAAQC,YAIjCtC,OAAOC,KAAKC,OAAOC,UAAU4C,cAAgB,SAAUC,GACnD,GAAIjD,KAAKyB,IAAK,CAEQyB,SAAdD,IACAA,GAAY,GAGZ/B,OAAOK,qBACPL,OAAOK,qBAAqBvB,KAAKyB,IAAIoB,kBAErCE,aAAa/C,KAAKyB,IAAIoB,iBAG1B,IAAIb,GAAchC,KAAKiC,2BAA6BjC,KAAKgC,WAErDiB,IACAjB,EAAYY,KAAK5C,KAAMA,KAAKyB,IAAInB,YAGpC,IAAIC,GAAUP,KAAKyB,IAAIlB,cAGhBP,MAAKyB,IAEoB,kBAArBlB,GAAQI,UACfJ,EAAQI"} \ No newline at end of file diff --git a/dist/markerAnimate.js b/dist/markerAnimate.umd.js similarity index 97% rename from dist/markerAnimate.js rename to dist/markerAnimate.umd.js index 2763f85..7970f5c 100644 --- a/dist/markerAnimate.js +++ b/dist/markerAnimate.umd.js @@ -1,14 +1,14 @@ (function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module unless amdModuleId is set - define(["jquery","jquery.easing"], function (a0,b1) { - return (factory(a0,b1)); + define(["jquery-easing"], function (a0) { + return (factory(a0)); }); } else if (typeof exports === 'object') { // Node. Does not work with strict CommonJS, but // only CommonJS-like environments that support module.exports, // like Node. - module.exports = factory(require("jquery"),require("jquery.easing")); + module.exports = factory(require("jquery-easing")); } else { factory(jQuery); } diff --git a/dist/markerAnimate.umd.min.js b/dist/markerAnimate.umd.min.js new file mode 100644 index 0000000..9d94a4e --- /dev/null +++ b/dist/markerAnimate.umd.min.js @@ -0,0 +1,4 @@ +/* markerAnimate v0.0.1 30-05-2015 Node wrapper for marker-animate (C) 2015 Terikon Software */ + +!function(a,b){"function"==typeof define&&define.amd?define(["jquery-easing"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery-easing")):b(jQuery)}(this,function(a){google.maps.Marker.prototype.animateTo=function(b,c){defaultOptions={duration:1e3,easing:"linear",complete:null,startLat:this.getPosition().lat(),startLng:this.getPosition().lng()},c=c||{};for(key in defaultOptions)c[key]=c[key]||defaultOptions[key];if("linear"!=c.easing&&("undefined"==typeof a||!a.easing[c.easing]))throw'"'+c.easing+"\" easing function doesn't exist. Include jQuery and/or the jQuery easing plugin and use the right function name.";window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,window.cancelAnimationFrame=window.cancelAnimationFrame||window.mozCancelAnimationFrame,this._AT={startPosition_lat:c.startLat,startPosition_lng:c.startLng,options:c,newPosition:b};var d=b.lat(),e=b.lng();Math.abs(e-this._AT.startPosition_lng)>180&&(e>this._AT.startPosition_lng?e-=360:e+=360);var f=this.AT_setPositionNoAnimation||this.setPosition,g=function(h,i){var j=(new Date).getTime()-i,k=j/c.duration,l=k;if("linear"!==c.easing&&(l=a.easing[c.easing](k,j,0,1,c.duration)),1>k){var m=new google.maps.LatLng(h._AT.startPosition_lat+(d-h._AT.startPosition_lat)*l,h._AT.startPosition_lng+(e-h._AT.startPosition_lng)*l);f.call(h,m),window.requestAnimationFrame?h._AT.animationHandler=window.requestAnimationFrame(function(){g(h,i)}):h._AT.animationHandler=setTimeout(function(){g(h,i)},17)}else f.call(h,b),"function"==typeof c.complete&&c.complete()};window.cancelAnimationFrame?window.cancelAnimationFrame(this._AT.animationHandler):clearTimeout(this._AT.animationHandler),g(this,(new Date).getTime())},google.maps.Marker.prototype.stopAnimation=function(a){if(this._AT){void 0===a&&(a=!0),window.cancelAnimationFrame?window.cancelAnimationFrame(this._AT.animationHandler):clearTimeout(this._AT.animationHandler);var b=this.AT_setPositionNoAnimation||this.setPosition;a&&b.call(this,this._AT.newPosition);var c=this._AT.options;delete this._AT,"function"==typeof c.complete&&c.complete()}}}); +//# sourceMappingURL=markerAnimate.umd.min.js.map \ No newline at end of file diff --git a/dist/markerAnimate.umd.min.js.map b/dist/markerAnimate.umd.min.js.map new file mode 100644 index 0000000..486f0fd --- /dev/null +++ b/dist/markerAnimate.umd.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"markerAnimate.umd.min.js","sources":["markerAnimate.umd.js"],"names":["root","factory","define","amd","a0","exports","module","require","jQuery","this","google","maps","Marker","prototype","animateTo","newPosition","options","defaultOptions","duration","easing","complete","startLat","getPosition","lat","startLng","lng","key","window","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","cancelAnimationFrame","mozCancelAnimationFrame","_AT","startPosition_lat","startPosition_lng","newPosition_lat","newPosition_lng","Math","abs","setPosition","AT_setPositionNoAnimation","animateStep","marker","startTime","ellapsedTime","Date","getTime","durationRatio","easingDurationRatio","deltaPosition","LatLng","call","animationHandler","setTimeout","clearTimeout","stopAnimation","jumpToEnd","undefined"],"mappings":";;CAAC,SAAUA,EAAMC,GACO,kBAAXC,SAAyBA,OAAOC,IAEzCD,QAAQ,iBAAkB,SAAUE,GAClC,MAAQH,GAAQG,KAEU,gBAAZC,SAIhBC,OAAOD,QAAUJ,EAAQM,QAAQ,kBAEjCN,EAAQO,SAEVC,KAAM,SAAUD,GAalBE,OAAOC,KAAKC,OAAOC,UAAUC,UAAY,SAASC,EAAaC,GAC7DC,gBACEC,SAAU,IACVC,OAAQ,SACRC,SAAU,KACVC,SAAUZ,KAAKa,cAAcC,MAC7BC,SAAUf,KAAKa,cAAcG,OAE/BT,EAAUA,KAGV,KAAKU,MAAOT,gBACVD,EAAQU,KAAOV,EAAQU,MAAQT,eAAeS,IAIhD,IAAsB,UAAlBV,EAAQG,SACW,mBAAVX,KAA0BA,EAAOW,OAAOH,EAAQG,SACzD,KAAM,IAAMH,EAAQG,OAAS,mHAKjCQ,QAAOC,sBAAwBD,OAAOC,uBAAyBD,OAAOE,0BAA4BF,OAAOG,6BAA+BH,OAAOI,wBAC/IJ,OAAOK,qBAAuBL,OAAOK,sBAAwBL,OAAOM,wBAGpExB,KAAKyB,KACDC,kBAAmBnB,EAAQK,SAC3Be,kBAAmBpB,EAAQ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AKyB,IAAIoB,kBAErCE,aAAa/C,KAAKyB,IAAIoB,iBAG1B,IAAIb,GAAchC,KAAKiC,2BAA6BjC,KAAKgC,WAErDiB,IACAjB,EAAYY,KAAK5C,KAAMA,KAAKyB,IAAInB,YAGpC,IAAIC,GAAUP,KAAKyB,IAAIlB,cAGhBP,MAAKyB,IAEoB,kBAArBlB,GAAQI,UACfJ,EAAQI"} \ No newline at end of file diff --git a/package.json b/package.json index 1b988f2..afc7061 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "title": "marker-animate", "version": "0.0.1", "description": "marker-animate", - "main": "markerAnimate.js", + "main": "dist/markerAnimate.umd.js", "scripts": { "//": "use '|| true' to prevent warning", "build": "npm install && grunt",