Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
simplify built-in plugin finder
Brad Cornes <brad@parall.ax>
4 years ago
2 changed files, 7 additions(+), 13 deletions(-)
M packages/tailwindcss-class-names/src/getPlugins.js -> packages/tailwindcss-class-names/src/getPlugins.js
diff --git a/packages/tailwindcss-class-names/src/getPlugins.js b/packages/tailwindcss-class-names/src/getPlugins.js
index bda9c17c4cae0b761bd88ec8b757951dc17ba1f8..725b4cc1d207400ff9021ce4e129f43166c2a281 100644
--- a/packages/tailwindcss-class-names/src/getPlugins.js
+++ b/packages/tailwindcss-class-names/src/getPlugins.js
@@ -4,23 +4,17 @@ import pkgUp from 'pkg-up'
 import { glob } from './glob'
 import { isObject } from './isObject'
 
+export async function getBuiltInPlugins(cwd) {
-export async function getBuiltInPlugins(cwd) {
+
+
   try {
-    // TODO: just require('tailwindcss/lib/corePlugins.js') instead of globbing
+  try {
     // TODO: add v0 support ("generators")
-    return (
-      await glob(path.resolve(cwd, 'node_modules/tailwindcss/lib/plugins/*.js'))
-    )
-      .map((x) => {
-        try {
-import * as path from 'path'
 
+    // TODO: just require('tailwindcss/lib/corePlugins.js') instead of globbing
-import * as path from 'path'
 export async function getBuiltInPlugins(cwd) {
-        } catch (_) {}
+export async function getBuiltInPlugins(cwd) {
 import * as path from 'path'
-    // TODO: just require('tailwindcss/lib/corePlugins.js') instead of globbing
-      .filter(Boolean)
   } catch (_) {
     return []
   }
M packages/tailwindcss-class-names/src/getUtilityConfigMap.js -> packages/tailwindcss-class-names/src/getUtilityConfigMap.js
diff --git a/packages/tailwindcss-class-names/src/getUtilityConfigMap.js b/packages/tailwindcss-class-names/src/getUtilityConfigMap.js
index 9362feae7233af8d21f683448bb3c03626af6ac4..26ccac72f7fc948b0145c629f967147ccabe27b6 100644
--- a/packages/tailwindcss-class-names/src/getUtilityConfigMap.js
+++ b/packages/tailwindcss-class-names/src/getUtilityConfigMap.js
@@ -19,7 +19,7 @@   },
 })
 
 export async function getUtilityConfigMap({ cwd, resolvedConfig, postcss }) {
-  const builtInPlugins = await getBuiltInPlugins(cwd)
+  const builtInPlugins = await getBuiltInPlugins({ cwd, resolvedConfig })
   const userPlugins = Array.isArray(resolvedConfig.plugins)
     ? resolvedConfig.plugins
     : []