Files
old-cto-as-you-go/CTOAsYouGo/node_modules/tailwindcss/lib/util/createPlugin.js

32 lines
815 B
JavaScript
Raw Normal View History

2023-07-01 10:42:40 +02:00
"use strict";
2023-07-05 11:02:15 +02:00
2023-07-01 10:42:40 +02:00
Object.defineProperty(exports, "__esModule", {
2023-07-05 11:02:15 +02:00
value: true
2023-07-01 10:42:40 +02:00
});
2023-07-05 11:02:15 +02:00
exports.default = void 0;
2023-07-01 10:42:40 +02:00
function createPlugin(plugin, config) {
2023-07-05 11:02:15 +02:00
return {
handler: plugin,
config
};
2023-07-01 10:42:40 +02:00
}
2023-07-05 11:02:15 +02:00
createPlugin.withOptions = function (pluginFunction, configFunction = () => ({})) {
const optionsFunction = function (options) {
return {
handler: pluginFunction(options),
config: configFunction(options)
2023-07-01 10:42:40 +02:00
};
2023-07-05 11:02:15 +02:00
};
optionsFunction.__isOptionsFunction = true; // Expose plugin dependencies so that `object-hash` returns a different
// value if anything here changes, to ensure a rebuild is triggered.
optionsFunction.__pluginFunction = pluginFunction;
optionsFunction.__configFunction = configFunction;
return optionsFunction;
2023-07-01 10:42:40 +02:00
};
2023-07-05 11:02:15 +02:00
var _default = createPlugin;
exports.default = _default;