From 8ba8c00a4209f1726193b91faa725dd55c9323cd Mon Sep 17 00:00:00 2001 From: Matthew Dean Date: Mon, 9 Jan 2017 07:12:46 -0800 Subject: [PATCH] Add UMD plugin format --- lib/less/plugin-api.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/less/plugin-api.js diff --git a/lib/less/plugin-api.js b/lib/less/plugin-api.js new file mode 100644 index 00000000..214c36b0 --- /dev/null +++ b/lib/less/plugin-api.js @@ -0,0 +1,13 @@ +(function (root, registerPlugin) { +if (typeof define === 'function' && define.amd) { define([], registerPlugin); +} else if (typeof module === 'object' && module.exports) { module.exports = registerPlugin(); +} else { if (!root.less) { root.less = {}; } if (!root.less.plugins) { root.less.plugins = []; } +root.less.plugins.push(registerPlugin()); } } + +(this, function () { + return { + install: function(less, pluginManager, functions) { + // functions.add('') + } + }; +})); \ No newline at end of file