compose-tailwindcss-plugins
v0.0.4
Published
compose your multiple tailwindcss plugins into one
Downloads
16
Maintainers
Readme
compose-tailwindcss-plugins
compose your tailwindcss plugins into one!
Install
<npm/yarn/pnpm> i -D compose-tailwindcss-plugins
Usage
const { composePlugins } = require('compose-tailwindcss-plugins')
const myComposedPlugin = composePlugins(plugin0,plugin1,[plugin2,plugin3])
/** @type {import('tailwindcss').Config} */
module.exports = {
// ...
plugins: [
myComposedPlugin // or myComposedPlugin(opt)
]
}
it works like:
const { composePlugins } = require('compose-tailwindcss-plugins')
/** @type {import('tailwindcss').Config} */
module.exports = {
// ...
plugins: [
- require('@tailwindcss/typography'),
- require('@tailwindcss/forms'),
- require('@tailwindcss/aspect-ratio'),
- require('@tailwindcss/container-queries'),
+ composePlugins([
+ require('@tailwindcss/typography'),
+ require('@tailwindcss/forms'),
+ require('@tailwindcss/aspect-ratio'),
+ require('@tailwindcss/container-queries'),
+ ])
]
}
License
MIT License © 2023-PRESENT sonofmagic