diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-10-25 19:41:15 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-10-25 19:41:15 +0100 |
commit | 78e492ca461ccba1ca57eb2362be02280ef232ac (patch) | |
tree | c93a0b737a4da3d8c8bd63285ad541778cb3ba95 /src | |
parent | 4505aeabed26fbcb7bb896f046c65da9e1bd65b1 (diff) | |
download | svg.js-78e492ca461ccba1ca57eb2362be02280ef232ac.tar.gz svg.js-78e492ca461ccba1ca57eb2362be02280ef232ac.zip |
UMD-Wrappper with possibility to add custom window object (#352)
Diffstat (limited to 'src')
-rw-r--r-- | src/umd.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/umd.js b/src/umd.js new file mode 100644 index 0000000..60b5785 --- /dev/null +++ b/src/umd.js @@ -0,0 +1,15 @@ +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + define(factory); + } else if (typeof exports === 'object') { + module.exports = root.document ? factory(root, root.document) : function(w){ return factory(w, w.document) }; + } else { + root.SVG = factory(root, root.document); + } +}(typeof window !== "undefined" ? window : this, function(window, document) { + +<%= contents %> + +return SVG + +}));
\ No newline at end of file |