From 1736ea5c37036903ae5ceed71f3f0771f84772db Mon Sep 17 00:00:00 2001 From: Matthew Dean Date: Mon, 9 Jan 2017 07:34:31 -0800 Subject: [PATCH] Update plugin API --- lib/less/plugin-api.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/less/plugin-api.js b/lib/less/plugin-api.js index 214c36b0..8ef84f14 100644 --- a/lib/less/plugin-api.js +++ b/lib/less/plugin-api.js @@ -1,10 +1,15 @@ (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 () { + 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 () { + // Less.js Plugin object return { install: function(less, pluginManager, functions) { // functions.add('')