--- a/js/flotr2/js/amd/pre.js +++ b/js/flotr2/js/amd/pre.js @@ -1,1 +1,16 @@ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['bean', 'underscore'], function (bean, _) { + // Also create a global in case some scripts + // that are loaded still are looking for + // a global even when an AMD loader is in use. + return (root.Flotr = factory(bean, _)); + }); + } else { + // Browser globals + root.Flotr = factory(root.bean, root._); + } +}(this, function (bean, _) { +