vendor/assets/javascripts/greensock/plugins/ModifiersPlugin.js in greensock-rails-1.19.0.0 vs vendor/assets/javascripts/greensock/plugins/ModifiersPlugin.js in greensock-rails-1.19.1.0

- old
+ new

@@ -1,11 +1,11 @@ /*! * VERSION: 0.0.2 - * DATE: 2016-07-14 + * DATE: 2017-01-17 * UPDATES AND DOCS AT: http://greensock.com * - * @license Copyright (c) 2008-2016, GreenSock. All rights reserved. + * @license Copyright (c) 2008-2017, GreenSock. All rights reserved. * This work is subject to the terms at http://greensock.com/standard-license or for * Club GreenSock members, the software agreement that was issued with your membership. * * @author: Jack Doyle, jack@greensock.com */ @@ -148,11 +148,25 @@ this._addTween(target, p, s, s + c, p, mod); this._overwriteProps.push(p); }; p = _gsScope._gsDefine.globals.TweenLite.version.split("."); - if (Number(p[0]) <= 1 && Number(p[1]) < 19 && window.console) { + if (Number(p[0]) <= 1 && Number(p[1]) < 19 && _gsScope.console) { console.log("ModifiersPlugin requires GSAP 1.19.0 or later."); } -}); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } +}); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } + +//export to AMD/RequireJS and CommonJS/Node (precursor to full modular build system coming at a later date) +(function(name) { + "use strict"; + var getGlobal = function() { + return (_gsScope.GreenSockGlobals || _gsScope)[name]; + }; + if (typeof(define) === "function" && define.amd) { //AMD + define(["TweenLite"], getGlobal); + } else if (typeof(module) !== "undefined" && module.exports) { //node + require("../TweenLite.js"); + module.exports = getGlobal(); + } +}("ModifiersPlugin")); \ No newline at end of file