JavaScript animation engine
make anime export as a UMD module
Max G J Panasb6b54342fbec
diff --git a/anime.js b/anime.jsindex 43d0bd18..8af76eaa 100644--- a/anime.js+++ b/anime.js@@ -7,8 +7,20 @@* Released under the MIT license*/-var anime = (function() {-+(function (root, factory) {+ if (typeof define === 'function' && define.amd) {+ // AMD. Register as an anonymous module.+ define([], factory);+ } else if (typeof module === 'object' && module.exports) {+ // Node. Does not work with strict CommonJS, but+ // only CommonJS-like environments that support module.exports,+ // like Node.+ module.exports = factory();+ } else {+ // Browser globals (root is window)+ root.anime = factory();+ }+}(this, function () {// Defaultsvar defaultSettings = {@@ -590,4 +602,4 @@ var anime = (function() {return animation;-})();+});