Add UMD plugin format

This commit is contained in:
Matthew Dean
2017-01-09 07:12:46 -08:00
parent 809dc509f3
commit 8ba8c00a42

13
lib/less/plugin-api.js Normal file
View File

@@ -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('')
}
};
}));