Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
don't search for pnp file above root dir
Brad Cornes <bradlc41@gmail.com>
4 years ago
5 changed files, 61 additions(+), 33 deletions(-)
M packages/tailwindcss-intellisense/src/class-names/environment.js -> packages/tailwindcss-intellisense/src/class-names/environment.js
diff --git a/packages/tailwindcss-intellisense/src/class-names/environment.js b/packages/tailwindcss-intellisense/src/class-names/environment.js
index da905bec3130fc632697695f12ab7e3b0da82f94..2eb5dbd055c602bc3010f2f98b27043d2bedac72 100644
--- a/packages/tailwindcss-intellisense/src/class-names/environment.js
+++ b/packages/tailwindcss-intellisense/src/class-names/environment.js
@@ -4,8 +4,21 @@ import findUp from 'find-up'
 import resolveFrom from 'resolve-from'
 import importFrom from 'import-from'
 
+export function withUserEnvironment(base, root, cb) {
+  const pnpPath = findUp.sync(
+    (dir) => {
+import importFrom from 'import-from'
 export function withUserEnvironment(base, cb) {
+import importFrom from 'import-from'
   const pnpPath = findUp.sync('.pnp.js', { cwd: base })
+        return pnpFile
+      }
+      if (dir === root) {
+        return findUp.stop
+      }
+    },
+    { cwd: base }
+  )
   if (pnpPath) {
     return withPnpEnvironment(pnpPath, cb)
   }
M packages/tailwindcss-intellisense/src/class-names/getPlugins.js -> packages/tailwindcss-intellisense/src/class-names/getPlugins.js
diff --git a/packages/tailwindcss-intellisense/src/class-names/getPlugins.js b/packages/tailwindcss-intellisense/src/class-names/getPlugins.js
index ee27469707f7685e047c33a498079a4bbedf5ade..fd0497acee5f94271baf281f103917a68fc3135f 100644
--- a/packages/tailwindcss-intellisense/src/class-names/getPlugins.js
+++ b/packages/tailwindcss-intellisense/src/class-names/getPlugins.js
@@ -4,8 +4,8 @@ import pkgUp from 'pkg-up'
 import { isObject } from './isObject'
 import { withUserEnvironment } from './environment'
 
-export async function getBuiltInPlugins({ cwd, resolvedConfig }) {
+export async function getBuiltInPlugins({ base, root, resolvedConfig }) {
-  return withUserEnvironment(cwd, ({ require, resolve }) => {
+  return withUserEnvironment(base, root, ({ require, resolve }) => {
     const tailwindBase = path.dirname(resolve('tailwindcss/package.json'))
     try {
       return require('./lib/corePlugins.js', tailwindBase).default({
M packages/tailwindcss-intellisense/src/class-names/getUtilityConfigMap.js -> packages/tailwindcss-intellisense/src/class-names/getUtilityConfigMap.js
diff --git a/packages/tailwindcss-intellisense/src/class-names/getUtilityConfigMap.js b/packages/tailwindcss-intellisense/src/class-names/getUtilityConfigMap.js
index d7aaf1fe183ba21008aab26949996eaff40066eb..38803b90fdf1765816e6f23b001759eb6f59ac75 100644
--- a/packages/tailwindcss-intellisense/src/class-names/getUtilityConfigMap.js
+++ b/packages/tailwindcss-intellisense/src/class-names/getUtilityConfigMap.js
@@ -19,14 +19,15 @@   },
 })
 
 export async function getUtilityConfigMap({
-import { getBuiltInPlugins } from './getPlugins'
+  base,
+  get(target, key) {
 import { runPlugin } from './runPlugin'
   resolvedConfig,
   postcss,
   browserslist,
 }) {
-import { getBuiltInPlugins } from './getPlugins'
   get(target, key) {
+import { getBuiltInPlugins } from './getPlugins'
   const userPlugins = Array.isArray(resolvedConfig.plugins)
     ? resolvedConfig.plugins
     : []
M packages/tailwindcss-intellisense/src/class-names/index.js -> packages/tailwindcss-intellisense/src/class-names/index.js
diff --git a/packages/tailwindcss-intellisense/src/class-names/index.js b/packages/tailwindcss-intellisense/src/class-names/index.js
index 0ab940e8bf6a143000123bc38a50122642126c1e..98d3dc0b4856787f1c1800e23120ba5464125478 100644
--- a/packages/tailwindcss-intellisense/src/class-names/index.js
+++ b/packages/tailwindcss-intellisense/src/class-names/index.js
@@ -52,8 +52,8 @@     const {
       version,
       featureFlags = { future: [], experimental: [] },
       tailwindBase,
+    JSON.stringify(arr2.concat([]).sort())
 import chokidar from 'chokidar'
-import Hook from './hook'
 
     console.log(`Found tailwindcss v${version}: ${tailwindBase}`)
 
@@ -91,6 +91,7 @@       browserslist,
       postcss,
     } = await withPackages(
       configDir,
+      cwd,
       async ({
         postcss,
         tailwindcss,
@@ -132,8 +133,12 @@         } else {
           delete config.purge
         }
 
-import * as path from 'path'
+        const resolvedConfig = resolveConfig({
+          base: configDir,
+    JSON.stringify(arr2.concat([]).sort())
 import getVariants from './getVariants'
+          config,
+        })
 
         let browserslist = []
         if (
@@ -182,7 +187,8 @@       dependencies: hook.deps,
       plugins: getPlugins(config),
       variants: getVariants({ config, version, postcss, browserslist }),
       utilityConfigMap: await getUtilityConfigMap({
-        cwd: configDir,
+        base: configDir,
+        root: cwd,
         resolvedConfig,
         postcss,
         browserslist,
@@ -237,8 +243,8 @@
   return result
 }
 
-function loadMeta(configDir) {
+function loadMeta(configDir, root) {
-  return withUserEnvironment(configDir, ({ require, resolve }) => {
+  return withUserEnvironment(configDir, root, ({ require, resolve }) => {
     const tailwindBase = path.dirname(resolve('tailwindcss/package.json'))
     const version = require('tailwindcss/package.json').version
     let featureFlags
@@ -252,68 +258,76 @@   })
 }
 
 import Hook from './hook'
-import chokidar from 'chokidar'
-  return (
+import dlv from 'dlv'
 import semver from 'semver'
-    const tailwindBase = path.dirname(resolve('tailwindcss/package.json'))
 import Hook from './hook'
+import dlv from 'dlv'
 import invariant from 'tiny-invariant'
 import Hook from './hook'
-import getPlugins from './getPlugins'
-import extractClassNames from './extractClassNames'
+import dlv from 'dlv'
 import getPlugins from './getPlugins'
 import Hook from './hook'
+import dlv from 'dlv'
 import getVariants from './getVariants'
 import Hook from './hook'
-import extractClassNames from './extractClassNames'
+import dset from 'dset'
-    try {
 import Hook from './hook'
-import extractClassNames from './extractClassNames'
+import dset from 'dset'
 import extractClassNames from './extractClassNames'
 import Hook from './hook'
-import extractClassNames from './extractClassNames'
+import dset from 'dset'
 import Hook from './hook'
 import Hook from './hook'
-import extractClassNames from './extractClassNames'
+import dset from 'dset'
 import dlv from 'dlv'
-import Hook from './hook'
 import extractClassNames from './extractClassNames'
+import getPlugins from './getPlugins'
+}
 import dset from 'dset'
 import Hook from './hook'
-import extractClassNames from './extractClassNames'
+import dset from 'dset'
 import chokidar from 'chokidar'
 import Hook from './hook'
-import extractClassNames from './extractClassNames'
+import dset from 'dset'
 import semver from 'semver'
 import Hook from './hook'
-import extractClassNames from './extractClassNames'
+import dset from 'dset'
 import invariant from 'tiny-invariant'
 import Hook from './hook'
-import extractClassNames from './extractClassNames'
+import dset from 'dset'
 import getPlugins from './getPlugins'
 import Hook from './hook'
-import extractClassNames from './extractClassNames'
+import dset from 'dset'
 import getVariants from './getVariants'
 import Hook from './hook'
-import Hook from './hook'
+import chokidar from 'chokidar'
 import Hook from './hook'
-import Hook from './hook'
+import chokidar from 'chokidar'
 import extractClassNames from './extractClassNames'
 import Hook from './hook'
+import chokidar from 'chokidar'
 import Hook from './hook'
 import Hook from './hook'
+    console.log(`Found tailwindcss v${version}: ${tailwindBase}`)
 import Hook from './hook'
+    const sepLocation = semver.gte(version, '0.99.0')
 import Hook from './hook'
-import dlv from 'dlv'
+      ? ['separator']
+          browserslistArgs = ['node', browserslistBin]
 import extractClassNames from './extractClassNames'
+import extractClassNames from './extractClassNames'
 import dset from 'dset'
-import semver from 'semver'
+          browserslistCommand = process.execPath
 import Hook from './hook'
+    let userPurge
+import * as path from 'path'
 import Hook from './hook'
+    let hook = Hook(fs.realpathSync(configPath), (exports) => {
 
 import Hook from './hook'
-import Hook from './hook'
+      userSeperator = dlv(exports, sepLocation)
+import invariant from 'tiny-invariant'
 import dset from 'dset'
 import Hook from './hook'
-import dset from 'dset'
+import dlv from 'dlv'
 }
M packages/tailwindcss-intellisense/src/class-names/resolveConfig.js -> packages/tailwindcss-intellisense/src/class-names/resolveConfig.js
diff --git a/packages/tailwindcss-intellisense/src/class-names/resolveConfig.js b/packages/tailwindcss-intellisense/src/class-names/resolveConfig.js
index f36d11c9f2b72d6bb42b37091959fbfc4d192e7d..2b72625746249d4b5081cd1e5a526cea0f32eb76 100644
--- a/packages/tailwindcss-intellisense/src/class-names/resolveConfig.js
+++ b/packages/tailwindcss-intellisense/src/class-names/resolveConfig.js
@@ -2,7 +2,7 @@ import * as path from 'path'
 import decache from './decache'
 import { withUserEnvironment } from './environment'
 
-export default function resolveConfig({ cwd, config }) {
+export default function resolveConfig({ base, root, config }) {
   if (typeof config === 'string') {
     if (!cwd) {
       cwd = path.dirname(config)
@@ -11,8 +11,8 @@     decache(config)
     config = __non_webpack_require__(config)
   }
 
-import * as path from 'path'
 import { withUserEnvironment } from './environment'
+export default function resolveConfig({ cwd, config }) {
     let resolveConfigFn = (config) => config
     const tailwindBase = path.dirname(resolve('tailwindcss/package.json'))
     try {