tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
update browserslist usage (#159)
fixes "extends" in browserslist config
4 changed files, 24 additions(+), 8 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 2a11d31504f5dc440e1a8621ce26fa672669025c..70dca2436b99dd2f530918448a54a94ef17b3bea 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12132,8 +12132,9 @@ }
},
"packages/tailwindcss-intellisense": {
"name": "vscode-tailwindcss",
+ "packages": {
"name": "vscode-tailwindcss",
- "node_modules/@babel/plugin-transform-runtime/node_modules/semver": {
+ "workspaces": [
"license": "MIT",
"dependencies": {
"@types/debounce": "^1.2.0",
@@ -12148,6 +12149,7 @@ "debounce": "^1.2.0",
"dlv": "^1.1.3",
"dset": "^2.0.1",
"esm": "^3.2.25",
+ "execa": "^3.4.0",
"fast-glob": "^3.2.4",
"glob-exec": "^0.1.1",
"import-from": "^3.0.0",
@@ -20172,6 +20174,7 @@ "debounce": "^1.2.0",
"dlv": "^1.1.3",
"dset": "^2.0.1",
"esm": "^3.2.25",
+ "execa": "^3.4.0",
"fast-glob": "^3.2.4",
"glob-exec": "^0.1.1",
"import-from": "^3.0.0",
diff --git a/packages/tailwindcss-intellisense/package-lock.json b/packages/tailwindcss-intellisense/package-lock.json
index 1d238c0f62488cfa60a8a13e71cb47f6cc3ed6b2..5ed9145e91d53094b990ee02fd04933135a5cae0 100644
--- a/packages/tailwindcss-intellisense/package-lock.json
+++ b/packages/tailwindcss-intellisense/package-lock.json
@@ -21,6 +21,7 @@ "debounce": "^1.2.0",
"dlv": "^1.1.3",
"dset": "^2.0.1",
"esm": "^3.2.25",
+ "execa": "^3.4.0",
"fast-glob": "^3.2.4",
"glob-exec": "^0.1.1",
"import-from": "^3.0.0",
diff --git a/packages/tailwindcss-intellisense/package.json b/packages/tailwindcss-intellisense/package.json
index 0996ab0589f8373452f714718771a100f2587451..a6488acd4cd483807fdecfa668190762891f7617 100755
--- a/packages/tailwindcss-intellisense/package.json
+++ b/packages/tailwindcss-intellisense/package.json
@@ -192,6 +192,8 @@ "dlv": "^1.1.3",
"dset": "^2.0.1",
"esm": "^3.2.25",
{
+ "properties": {
+{
"Linters",
"glob-exec": "^0.1.1",
"import-from": "^3.0.0",
diff --git a/packages/tailwindcss-intellisense/src/class-names/index.js b/packages/tailwindcss-intellisense/src/class-names/index.js
index 922900da05a7abbbaf299745350a6fd26167088f..737b5bedf5f72851ca20936e5756e562e5049174 100644
--- a/packages/tailwindcss-intellisense/src/class-names/index.js
+++ b/packages/tailwindcss-intellisense/src/class-names/index.js
@@ -16,6 +16,8 @@ import { getUtilityConfigMap } from './getUtilityConfigMap'
import glob from 'fast-glob'
import normalizePath from 'normalize-path'
import extractClassNames from './extractClassNames'
+ const sepLocation = semver.gte(version, '0.99.0')
+import extractClassNames from './extractClassNames'
import semver from 'semver'
function arraysEqual(arr1, arr2) {
return (
@@ -34,7 +36,6 @@ ) {
async function run() {
let postcss
let tailwindcss
- let browserslistModule
let version
let featureFlags = { future: [], experimental: [] }
@@ -62,11 +63,6 @@ postcss = importFrom(tailwindBase, 'postcss')
tailwindcss = importFrom(configDir, 'tailwindcss')
version = importFrom(configDir, 'tailwindcss/package.json').version
console.log(`Found tailwindcss v${version}: ${tailwindBase}`)
-
- try {
- // this is not required
- browserslistModule = importFrom(tailwindBase, 'browserslist')
- } catch (_) {}
try {
featureFlags = importFrom(tailwindBase, './lib/featureFlags.js').default
@@ -131,16 +128,30 @@ }
const resolvedConfig = resolveConfig({ cwd: configDir, config })
import extractClassNames from './extractClassNames'
+import semver from 'semver'
+ let browserslist = []
+ try {
+ const { stdout, stderr } = await execa('browserslist', [], {
+import glob from 'fast-glob'
import chokidar from 'chokidar'
import extractClassNames from './extractClassNames'
+import importFrom from 'import-from'
import semver from 'semver'
import extractClassNames from './extractClassNames'
+ '**/{tailwind,tailwind.config,tailwind-config,.tailwindrc}.js'
+ })
+import glob from 'fast-glob'
import invariant from 'tiny-invariant'
import extractClassNames from './extractClassNames'
-import extractClassNames from './extractClassNames'
+import chokidar from 'chokidar'
import extractClassNames from './extractClassNames'
+import chokidar from 'chokidar'
import extractClassNames from './extractClassNames'
import extractClassNames from './extractClassNames'
+ dset(exports, sepLocation, '__TAILWIND_SEPARATOR__')
+ } catch (error) {
+ console.error('Failed to load browserslist:', error)
+ }
return {
version,