mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2026-01-25 16:44:12 +00:00
22 lines
412 B
JavaScript
22 lines
412 B
JavaScript
function createPlugin(plugin, config) {
|
|
return {
|
|
handler: plugin,
|
|
config,
|
|
}
|
|
}
|
|
|
|
createPlugin.withOptions = function(pluginFunction, configFunction) {
|
|
const optionsFunction = function(options) {
|
|
return {
|
|
handler: pluginFunction(options),
|
|
config: configFunction(options),
|
|
}
|
|
}
|
|
|
|
optionsFunction.__isOptionsFunction = true
|
|
|
|
return optionsFunction
|
|
}
|
|
|
|
export default createPlugin
|