PHP 7.4.33
Preview: plugin.js Size: 1.33 KB
/var/www/cookieconsent.bitkit.dk/httpdocs/node_modules/tailwindcss/src/plugin.js
import setupTrackingContext from './lib/setupTrackingContext'
import processTailwindFeatures from './processTailwindFeatures'
import { env } from './lib/sharedState'
import { findAtConfigPath } from './lib/findAtConfigPath'

module.exports = function tailwindcss(configOrPath) {
  return {
    postcssPlugin: 'tailwindcss',
    plugins: [
      env.DEBUG &&
        function (root) {
          console.log('\n')
          console.time('JIT TOTAL')
          return root
        },
      async function (root, result) {
        // Use the path for the `@config` directive if it exists, otherwise use the
        // path for the file being processed
        configOrPath = findAtConfigPath(root, result) ?? configOrPath

        let context = setupTrackingContext(configOrPath)

        if (root.type === 'document') {
          let roots = root.nodes.filter((node) => node.type === 'root')

          for (const root of roots) {
            if (root.type === 'root') {
              await processTailwindFeatures(context)(root, result)
            }
          }

          return
        }

        await processTailwindFeatures(context)(root, result)
      },
      env.DEBUG &&
        function (root) {
          console.timeEnd('JIT TOTAL')
          console.log('\n')
          return root
        },
    ].filter(Boolean),
  }
}

module.exports.postcss = true

Directory Contents

Dirs: 7 × Files: 8
Name Size Perms Modified Actions
cli DIR
- drwxr-xr-x 2025-06-16 05:45:40
Edit Download
css DIR
- drwxr-xr-x 2025-06-16 05:45:40
Edit Download
lib DIR
- drwxr-xr-x 2025-06-16 05:45:41
Edit Download
- drwxr-xr-x 2025-06-16 05:45:40
Edit Download
public DIR
- drwxr-xr-x 2025-06-16 05:45:40
Edit Download
util DIR
- drwxr-xr-x 2025-06-16 05:45:40
Edit Download
- drwxr-xr-x 2025-06-16 05:45:41
Edit Download
274 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
61 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
2.52 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
90.34 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
1.65 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
37 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
1.33 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
2.18 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).