From 78e492ca461ccba1ca57eb2362be02280ef232ac Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Sun, 25 Oct 2015 19:41:15 +0100 Subject: UMD-Wrappper with possibility to add custom window object (#352) --- src/umd.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/umd.js (limited to 'src') 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 -- cgit v1.2.3