compose-tailwindcss-plugins
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

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

Package Sidebar

Install

npm i compose-tailwindcss-plugins

Weekly Downloads

0

Version

0.0.4

License

MIT

Unpacked Size

15.9 kB

Total Files

8

Last publish

Collaborators

  • icebreaker