source: frontend/node_modules/tailwindcss/lib/util/createPlugin.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 961 bytes
RevLine 
[9af201e]1"use strict";
2Object.defineProperty(exports, "__esModule", {
3 value: true
4});
5Object.defineProperty(exports, "default", {
6 enumerable: true,
7 get: function() {
8 return _default;
9 }
10});
11function createPlugin(plugin, config) {
12 return {
13 handler: plugin,
14 config
15 };
16}
17createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {
18 const optionsFunction = function(options) {
19 return {
20 __options: options,
21 handler: pluginFunction(options),
22 config: configFunction(options)
23 };
24 };
25 optionsFunction.__isOptionsFunction = true;
26 // Expose plugin dependencies so that `object-hash` returns a different
27 // value if anything here changes, to ensure a rebuild is triggered.
28 optionsFunction.__pluginFunction = pluginFunction;
29 optionsFunction.__configFunction = configFunction;
30 return optionsFunction;
31};
32const _default = createPlugin;
Note: See TracBrowser for help on using the repository browser.