From e74b5a7c1a42b7e03da2855b23a57ea87b3fc066 Mon Sep 17 00:00:00 2001 From: Denis LE Date: Sat, 28 Mar 2020 19:06:58 +0100 Subject: [PATCH 01/19] add to readme that tailwind.config.js is required fix #74 --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index f766281..4b630e7 100755 --- a/README.md +++ b/README.md @@ -48,3 +48,7 @@ Before: After: CSS syntax highlighting after + +## Requirements + +This extension requires a `tailwind.config.js` file to be [present in your project folder](https://github.com/bradlc/vscode-tailwindcss/blob/master/package.json#L26). You can create it with `npx tailwind init`. From 0f5613b15717cecde62078bb1623816df24d117c Mon Sep 17 00:00:00 2001 From: Denis LE Date: Sat, 9 May 2020 21:48:32 +0200 Subject: [PATCH 02/19] tailwindcss must be installed --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4b630e7..4289a40 100755 --- a/README.md +++ b/README.md @@ -51,4 +51,6 @@ After: ## Requirements -This extension requires a `tailwind.config.js` file to be [present in your project folder](https://github.com/bradlc/vscode-tailwindcss/blob/master/package.json#L26). You can create it with `npx tailwind init`. +This extension requires: +* a `tailwind.config.js` file to be [present in your project folder](https://github.com/bradlc/vscode-tailwindcss/blob/master/package.json#L26). You can create it with `npx tailwind init`. +* `tailwindcss` to be installed (present in project `node_modules/`) From 1c49bfb99807c36ee56a1afb4f8e22c85521ab35 Mon Sep 17 00:00:00 2001 From: Denis LE Date: Sun, 17 May 2020 19:26:36 +0200 Subject: [PATCH 03/19] Move requirements section over features section --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4289a40..2a636f9 100755 --- a/README.md +++ b/README.md @@ -6,6 +6,12 @@ HTML autocompletion +## Requirements + +This extension requires: +* a `tailwind.config.js` file to be [present in your project folder](https://github.com/bradlc/vscode-tailwindcss/blob/master/package.json#L26). You can create it with `npx tailwind init`. +* `tailwindcss` to be installed (present in project `node_modules/`) + ## Features Tailwind CSS IntelliSense uses your projects Tailwind installation and configuration to provide suggestions as you type. @@ -48,9 +54,3 @@ Before: After: CSS syntax highlighting after - -## Requirements - -This extension requires: -* a `tailwind.config.js` file to be [present in your project folder](https://github.com/bradlc/vscode-tailwindcss/blob/master/package.json#L26). You can create it with `npx tailwind init`. -* `tailwindcss` to be installed (present in project `node_modules/`) From 02683ece850414283986044abc6c540e6acfaea4 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Sun, 24 May 2020 18:32:25 +0100 Subject: [PATCH 04/19] add class list finder helper and fix ranges --- src/lsp/util/css.ts | 2 +- src/lsp/util/find.ts | 104 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 93 insertions(+), 13 deletions(-) diff --git a/src/lsp/util/css.ts b/src/lsp/util/css.ts index 848d6bb..e6dbd09 100644 --- a/src/lsp/util/css.ts +++ b/src/lsp/util/css.ts @@ -12,7 +12,7 @@ export const CSS_LANGUAGES = [ 'sugarss', ] -function isCssDoc(state: State, doc: TextDocument): boolean { +export function isCssDoc(state: State, doc: TextDocument): boolean { const userCssLanguages = Object.keys( state.editor.userLanguages ).filter((lang) => CSS_LANGUAGES.includes(state.editor.userLanguages[lang])) diff --git a/src/lsp/util/find.ts b/src/lsp/util/find.ts index 2fa3895..6b1bfca 100644 --- a/src/lsp/util/find.ts +++ b/src/lsp/util/find.ts @@ -1,10 +1,10 @@ import { TextDocument, Range, Position } from 'vscode-languageserver' import { DocumentClassName, DocumentClassList, State } from './state' import lineColumn from 'line-column' -import { isCssContext } from './css' -import { isHtmlContext } from './html' +import { isCssContext, isCssDoc } from './css' +import { isHtmlContext, isHtmlDoc, isSvelteDoc, isVueDoc } from './html' import { isWithinRange } from './isWithinRange' -import { isJsContext } from './js' +import { isJsContext, isJsDoc } from './js' import { getClassAttributeLexer } from './lexers' export function findAll(re: RegExp, str: string): RegExpMatchArray[] { @@ -26,8 +26,8 @@ export function findLast(re: RegExp, str: string): RegExpMatchArray { export function findClassNamesInRange( doc: TextDocument, - range: Range, - mode: 'html' | 'css' + range?: Range, + mode?: 'html' | 'css' ): DocumentClassName[] { const classLists = findClassListsInRange(doc, range, mode) return [].concat.apply( @@ -66,10 +66,11 @@ export function findClassNamesInRange( export function findClassListsInCssRange( doc: TextDocument, - range: Range + range?: Range ): DocumentClassList[] { const text = doc.getText(range) const matches = findAll(/(@apply\s+)(?[^;}]+)[;}]/g, text) + const globalStart: Position = range ? range.start : { line: 0, character: 0 } return matches.map((match) => { const start = indexToPosition(text, match.index + match[1].length) @@ -81,12 +82,14 @@ export function findClassListsInCssRange( classList: match.groups.classList, range: { start: { - line: range.start.line + start.line, - character: range.start.character + start.character, + line: globalStart.line + start.line, + character: + (end.line === 0 ? globalStart.character : 0) + start.character, }, end: { - line: range.start.line + end.line, - character: range.start.character + end.character, + line: globalStart.line + end.line, + character: + (end.line === 0 ? globalStart.character : 0) + end.character, }, }, } @@ -172,11 +175,14 @@ export function findClassListsInHtmlRange( range: { start: { line: range.start.line + start.line, - character: range.start.character + start.character, + character: + (end.line === 0 ? range.start.character : 0) + + start.character, }, end: { line: range.start.line + end.line, - character: range.start.character + end.character, + character: + (end.line === 0 ? range.start.character : 0) + end.character, }, }, } @@ -199,6 +205,80 @@ export function findClassListsInRange( return findClassListsInHtmlRange(doc, range) } +export function findClassListsInDocument( + state: State, + doc: TextDocument +): DocumentClassList[] { + if (isCssDoc(state, doc)) { + return findClassListsInCssRange(doc) + } + + if (isVueDoc(doc)) { + let text = doc.getText() + let blocks = findAll( + /<(?template|style|script)\b[^>]*>.*?(<\/\k>|$)/gis, + text + ) + let htmlRanges: Range[] = [] + let cssRanges: Range[] = [] + for (let i = 0; i < blocks.length; i++) { + let range = { + start: indexToPosition(text, blocks[i].index), + end: indexToPosition(text, blocks[i].index + blocks[i][0].length), + } + if (blocks[i].groups.type === 'style') { + cssRanges.push(range) + } else { + htmlRanges.push(range) + } + } + return [].concat.apply( + [], + [ + ...htmlRanges.map((range) => findClassListsInHtmlRange(doc, range)), + ...cssRanges.map((range) => findClassListsInCssRange(doc, range)), + ] + ) + } + + if (isHtmlDoc(state, doc) || isJsDoc(state, doc) || isSvelteDoc(doc)) { + let text = doc.getText() + let styleBlocks = findAll(/]*>|>).*?(<\/style>|$)/gis, text) + let htmlRanges: Range[] = [] + let cssRanges: Range[] = [] + let currentIndex = 0 + + for (let i = 0; i < styleBlocks.length; i++) { + htmlRanges.push({ + start: indexToPosition(text, currentIndex), + end: indexToPosition(text, styleBlocks[i].index), + }) + cssRanges.push({ + start: indexToPosition(text, styleBlocks[i].index), + end: indexToPosition( + text, + styleBlocks[i].index + styleBlocks[i][0].length + ), + }) + currentIndex = styleBlocks[i].index + styleBlocks[i][0].length + } + htmlRanges.push({ + start: indexToPosition(text, currentIndex), + end: indexToPosition(text, text.length), + }) + + return [].concat.apply( + [], + [ + ...htmlRanges.map((range) => findClassListsInHtmlRange(doc, range)), + ...cssRanges.map((range) => findClassListsInCssRange(doc, range)), + ] + ) + } + + return [] +} + function indexToPosition(str: string, index: number): Position { const { line, col } = lineColumn(str + '\n', index) return { line: line - 1, character: col - 1 } From bf524542ce49695eb17ee40e58c2106e4c48155f Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Mon, 25 May 2020 19:37:45 +0100 Subject: [PATCH 05/19] add gohtml --- src/lib/languages.ts | 2 ++ src/lsp/util/html.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/lib/languages.ts b/src/lib/languages.ts index 777f588..0b9c450 100644 --- a/src/lib/languages.ts +++ b/src/lib/languages.ts @@ -6,6 +6,8 @@ export const DEFAULT_LANGUAGES = [ 'edge', 'ejs', 'erb', + 'gohtml', + 'GoHTML', 'haml', 'handlebars', 'hbs', diff --git a/src/lsp/util/html.ts b/src/lsp/util/html.ts index 8808141..7f24b2e 100644 --- a/src/lsp/util/html.ts +++ b/src/lsp/util/html.ts @@ -8,6 +8,8 @@ export const HTML_LANGUAGES = [ 'edge', 'ejs', 'erb', + 'gohtml', + 'GoHTML', 'haml', 'handlebars', 'hbs', From 5f6b8e3f4e3e5b05772156d73abdab8613b69c21 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Mon, 25 May 2020 20:09:55 +0100 Subject: [PATCH 06/19] v0.3.0-alpha.3 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index f844afb..c25e171 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vscode-tailwindcss", - "version": "0.3.0-alpha.2", + "version": "0.3.0-alpha.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0b515ca..7e98f03 100755 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "preview": true, "author": "Brad Cornes ", "license": "MIT", - "version": "0.3.0-alpha.2", + "version": "0.3.0-alpha.3", "repository": { "type": "git", "url": "https://github.com/bradlc/" From bdfe43a6392c0176d6b387dc26229ac86f4a55e5 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 11 Jun 2020 12:10:47 +0100 Subject: [PATCH 07/19] provide corePlugins helper when running plugins --- src/class-names/runPlugin.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/class-names/runPlugin.js b/src/class-names/runPlugin.js index dbdd2b5..118961e 100644 --- a/src/class-names/runPlugin.js +++ b/src/class-names/runPlugin.js @@ -17,6 +17,12 @@ export function runPlugin(plugin, params = {}) { theme: (path, defaultValue) => dlv(config, `theme.${path}`, defaultValue), variants: () => [], config: (path, defaultValue) => dlv(config, path, defaultValue), + corePlugins: (path) => { + if (Array.isArray(config.corePlugins)) { + return config.corePlugins.includes(path) + } + return dlv(config, `corePlugins.${path}`, true) + }, target: (path) => { if (typeof config.target === 'string') { return config.target === 'browserslist' From 2c6b77799c5fcbadb05a2bd5a4e53e9612d6426f Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 11 Jun 2020 15:25:15 +0100 Subject: [PATCH 08/19] add changelog and readme --- CHANGELOG.md | 31 +++++++++++++++++++++++++++++++ README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 README.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..5c867ef --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,31 @@ +# Changelog + +## 0.2.0 + +- Support for Tailwind v1 via LSP 🎉 +- Support for multi-root workspaces +- Support for reason, slim, edge, njk, svelte files (thanks [@nhducit](https://github.com/nhducit), [@wayness](https://github.com/wayness), [@mattwaler](https://github.com/mattwaler), [@guillaumebriday](https://github.com/guillaumebriday)) +- Support for non-default Tailwind separators +- Add `@variants` completions +- Better support for dynamic class(Name) values in JSX +- Disables Emmet support by default. This can be enabled via the `tailwindCSS.emmetCompletions` setting + +## 0.1.16 + +- add support for [EEx templates](https://hexdocs.pm/phoenix/templates.html), via [vscode-elixir](https://marketplace.visualstudio.com/items?itemName=mjmcloug.vscode-elixir) – thanks [@dhc02](https://github.com/dhc02) + +## 0.1.15 + +- add support for [leaf](https://github.com/vapor/leaf) files (#16) + +## 0.1.10 + +- add syntax definitions for `@apply` and `config()`: + + **Before:** + + Syntax highlighting before update + + **After:** + + Syntax highlighting after update diff --git a/README.md b/README.md new file mode 100644 index 0000000..f766281 --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +# Tailwind CSS IntelliSense + +> [Tailwind CSS](https://tailwindcss.com/) class name completion for VS Code + +**[Get it from the VS Code Marketplace →](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)** + +HTML autocompletion + +## Features + +Tailwind CSS IntelliSense uses your projects Tailwind installation and configuration to provide suggestions as you type. + +It also includes features that improve the overall Tailwind experience, including improved syntax highlighting, and CSS previews. + +### HTML (including Vue, JSX, PHP etc.) + +- [Class name suggestions, including support for Emmet syntax](#class-name-suggestions-including-support-for-emmet-syntax) + - Suggestions include color previews where applicable, for example for text and background colors + - They also include a preview of the actual CSS for that class name +- [CSS preview when hovering over class names](#css-preview-when-hovering-over-class-names) + +### CSS + +- [Suggestions when using `@apply` and `config()`](#suggestions-when-using-apply-and-config) +- Suggestions when using the `@screen` directive +- [Improves syntax highlighting when using `@apply` and `config()`](#improves-syntax-highlighting-when-using-apply-and-config) + +## Examples + +#### Class name suggestions, including support for Emmet syntax + +HTML autocompletion + +#### CSS preview when hovering over class names + +HTML hover preview + +#### Suggestions when using `@apply` and `config()` + +CSS autocompletion + +#### Improves syntax highlighting when using `@apply` and `config()` + +Before: + +CSS syntax highlighting before + +After: + +CSS syntax highlighting after From 0af54765b2ab564335f846484a58d9eebba9725a Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 11 Jun 2020 15:59:49 +0100 Subject: [PATCH 09/19] update package.json --- package.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7e98f03..66d69ad 100755 --- a/package.json +++ b/package.json @@ -6,9 +6,14 @@ "author": "Brad Cornes ", "license": "MIT", "version": "0.3.0-alpha.3", + "homepage": "https://github.com/bradlc/vscode-tailwindcss", + "bugs": { + "url": "https://github.com/bradlc/vscode-tailwindcss/issues", + "email": "hello@bradley.dev" + }, "repository": { "type": "git", - "url": "https://github.com/bradlc/" + "url": "https://github.com/bradlc/vscode-tailwindcss.git" }, "publisher": "bradlc", "keywords": [ From b8eda022eab80d24d83793d606c3f3cceee14e08 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 11 Jun 2020 16:00:51 +0100 Subject: [PATCH 10/19] update changelog and readme --- CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ README.md | 33 +++++++++++++++++++++++++++++---- 2 files changed, 73 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c867ef..f8bf3f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,49 @@ # Changelog +## 0.3.0 + +### General + +- Added support for string values in Tailwind's `important` option (#96) +- Removed all unnecessary logs (#91) +- Added support for components in addition to utilities (#67) +- Added description to custom variant completion items where possible +- Config parsing errors are now displayed in the VS Code UI +- Class names from `@tailwind base` are now included (by default `@tailwind base` does not include any class names but plugins may contribute them) +- Color swatches can now be displayed for rules with multiple properties and/or colors with variable alpha (#113) +- Added `tailwindCSS.includeLanguages` setting: + ```json + { + "tailwindCSS.includeLanguages": { + "plaintext": "html" + } + } + ``` + This setting allows you to add additional language support. The key of each entry is the new language ID and the value is any one of the extensions built-in languages, depending on how you want the new language to be treated (e.g. `html`, `css`, or `javascript`) + +### HTML + +- Added built-in support for `liquid`, `aspnetcorerazor`, `mustache`, `HTML (EEx)`, `html-eex`, `gohtml`, `GoHTML`, and `hbs` languages +- Added syntax definition to embedded stylesheets in HTML files + +### CSS + +- Added built-in support for `sugarss` language +- Added `theme` (and `config`) helper hovers +- Added `@apply` class name hovers +- Added directive completion items with links to documentation +- Added `@tailwind` completion items (`preflight`/`base`, `utilities`, `components`, `screens`) with links to documentation +- Helper completion items that contain the `.` character will now insert square brackets when selected +- `@apply` completion list now excludes class names that are not compatible +- Added CSS syntax highlighting in `.vue` files (#15) + +### JS(X) + +- Completions now trigger when using backticks (#50, #93): + ```js + const App = () =>
-#### Suggestions when using `@apply` and `config()` +#### Suggestions when using `@apply` and config helpers CSS autocompletion -#### Improves syntax highlighting when using `@apply` and `config()` +#### Improves syntax highlighting when using `@apply` and config helpers Before: @@ -48,3 +49,27 @@ Before: After: CSS syntax highlighting after + +## Settings + +### `tailwindCSS.includeLanguages` + +This setting allows you to add additional language support. The key of each entry is the new language ID and the value is any one of the extensions built-in languages, depending on how you want the new language to be treated (e.g. `html`, `css`, or `javascript`): + +```json +{ + "tailwindCSS.includeLanguages": { + "plaintext": "html" + } +} +``` + +### `tailwindcss.emmetCompletions` + +Enable completions when using [Emmet](https://emmet.io/)-style syntax, for example `div.bg-red-500.uppercase`. Default: `false` + +```json +{ + "tailwindCSS.emmetCompletions": true +} +``` From 6a97195c2c5d6e9978722ccb23d6108a6de3a2c9 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 11 Jun 2020 16:02:15 +0100 Subject: [PATCH 11/19] emphasize default setting --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d6ae5f1..04b1527 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ This setting allows you to add additional language support. The key of each entr ### `tailwindcss.emmetCompletions` -Enable completions when using [Emmet](https://emmet.io/)-style syntax, for example `div.bg-red-500.uppercase`. Default: `false` +Enable completions when using [Emmet](https://emmet.io/)-style syntax, for example `div.bg-red-500.uppercase`. **Default: `false`** ```json { From c767352f2ae4dbba6eac589aca7478fa4677ac24 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 11 Jun 2020 16:03:11 +0100 Subject: [PATCH 12/19] fix changelog spacing --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8bf3f3..68f8402 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Class names from `@tailwind base` are now included (by default `@tailwind base` does not include any class names but plugins may contribute them) - Color swatches can now be displayed for rules with multiple properties and/or colors with variable alpha (#113) - Added `tailwindCSS.includeLanguages` setting: + ```json { "tailwindCSS.includeLanguages": { @@ -19,6 +20,7 @@ } } ``` + This setting allows you to add additional language support. The key of each entry is the new language ID and the value is any one of the extensions built-in languages, depending on how you want the new language to be treated (e.g. `html`, `css`, or `javascript`) ### HTML @@ -40,6 +42,7 @@ ### JS(X) - Completions now trigger when using backticks (#50, #93): + ```js const App = () =>
Date: Thu, 11 Jun 2020 16:03:54 +0100 Subject: [PATCH 13/19] fix changelog spacing? --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68f8402..2a3252e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,6 @@ } } ``` - This setting allows you to add additional language support. The key of each entry is the new language ID and the value is any one of the extensions built-in languages, depending on how you want the new language to be treated (e.g. `html`, `css`, or `javascript`) ### HTML From 442c1132a7045a38f6676bb6aa13a9bf3a688f78 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 11 Jun 2020 16:06:39 +0100 Subject: [PATCH 14/19] fix changelog spacing --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a3252e..f8bf3f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,6 @@ - Class names from `@tailwind base` are now included (by default `@tailwind base` does not include any class names but plugins may contribute them) - Color swatches can now be displayed for rules with multiple properties and/or colors with variable alpha (#113) - Added `tailwindCSS.includeLanguages` setting: - ```json { "tailwindCSS.includeLanguages": { @@ -41,7 +40,6 @@ ### JS(X) - Completions now trigger when using backticks (#50, #93): - ```js const App = () =>
Date: Thu, 11 Jun 2020 16:13:49 +0100 Subject: [PATCH 15/19] add requirements to readme (thanks @ledenis) --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 04b1527..27cc6e8 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,12 @@ HTML autocompletion +## Requirements + +This extension requires: +- a `tailwind.config.js` file to be [present in your project folder](https://github.com/bradlc/vscode-tailwindcss/blob/master/package.json#L38). You can create it with `npx tailwind init`. +- `tailwindcss` to be installed (present in project `node_modules/`) + ## Features Tailwind CSS IntelliSense uses your projects Tailwind installation and configuration to provide suggestions as you type. From d4e8df0b67daec37e4f80f3faebc6a48dd15ac19 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 11 Jun 2020 16:20:03 +0100 Subject: [PATCH 16/19] update .vscodeignore --- .vscodeignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.vscodeignore b/.vscodeignore index 97c56c3..eef67fb 100755 --- a/.vscodeignore +++ b/.vscodeignore @@ -7,3 +7,4 @@ contributing.md node_modules/** src/** +tests/** From 258fc59ec61d5413f41dfd96bdbcd8ad94ace7a1 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 11 Jun 2020 16:45:58 +0100 Subject: [PATCH 17/19] update setting descriptions --- package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 66d69ad..31d92ed 100755 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "preview": true, "author": "Brad Cornes ", "license": "MIT", - "version": "0.3.0-alpha.3", + "version": "0.3.0", "homepage": "https://github.com/bradlc/vscode-tailwindcss", "bugs": { "url": "https://github.com/bradlc/vscode-tailwindcss/issues", @@ -60,11 +60,12 @@ "tailwindCSS.emmetCompletions": { "type": "boolean", "default": false, - "description": "" + "description": "Enable class name completions when using Emmet-style syntax, for example `div.bg-red-500.uppercase`." }, "tailwindCSS.includeLanguages": { "type": "object", - "default": {} + "default": {}, + "description": "Enable features in languages that are not supported by default. Add a mapping here between the new language and an already supported language.\n E.g.: `{\"plaintext\": \"html\"}`" } } } From ae52d3b55e7763e688e5ba54d4d718cec4e1b63d Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 11 Jun 2020 16:53:12 +0100 Subject: [PATCH 18/19] add .vscode --- .vscode/launch.json | 37 +++++++++++++++++++++++++++++++++++++ .vscode/tasks.json | 29 +++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100755 .vscode/launch.json create mode 100755 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100755 index 0000000..9612267 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,37 @@ +{ + "version": "0.2.0", + // List of configurations. Add new configurations or edit existing ones. + "configurations": [ + { + "type": "extensionHost", + "request": "launch", + "name": "Launch Client", + "runtimeExecutable": "${execPath}", + "args": ["--extensionDevelopmentPath=${workspaceRoot}"], + "stopOnEntry": false, + "sourceMaps": true, + "outFiles": ["${workspaceRoot}/dist/extension/**/*.js"], + // "preLaunchTask": "npm: dev" + }, + { + "type": "node", + "request": "attach", + "name": "Attach to Server 6011", + "address": "localhost", + "protocol": "inspector", + "port": 6011, + "sourceMaps": true, + "outFiles": ["${workspaceRoot}/dist/server/**/*.js"] + }, + { + "type": "node", + "request": "attach", + "name": "Attach to Server 6012", + "address": "localhost", + "protocol": "inspector", + "port": 6012, + "sourceMaps": true, + "outFiles": ["${workspaceRoot}/dist/server/**/*.js"] + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100755 index 0000000..4b2d95f --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,29 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "build", + "group": "build", + "presentation": { + "panel": "dedicated", + "reveal": "never" + }, + "problemMatcher": ["$tsc"] + }, + { + "type": "npm", + "script": "dev", + "isBackground": true, + "group": { + "kind": "build", + "isDefault": true + }, + "presentation": { + "panel": "dedicated", + "reveal": "never" + }, + "problemMatcher": ["$tsc-watch"] + } + ] +} From b51fd5140fa1ebb67f1ef9a6ad4aecdde03cda5a Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 11 Jun 2020 17:03:41 +0100 Subject: [PATCH 19/19] update vsce --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index c25e171..9f6cc9e 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vscode-tailwindcss", - "version": "0.3.0-alpha.3", + "version": "0.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -4845,9 +4845,9 @@ }, "dependencies": { "entities": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", - "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", "dev": true } } @@ -6896,9 +6896,9 @@ } }, "vsce": { - "version": "1.75.0", - "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.75.0.tgz", - "integrity": "sha512-qyAQTmolxKWc9bV1z0yBTSH4WEIWhDueBJMKB0GUFD6lM4MiaU1zJ9BtzekUORZu094YeNSKz0RmVVuxfqPq0g==", + "version": "1.76.1", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.76.1.tgz", + "integrity": "sha512-WNx6JzRywxAOuhVpjmrsI0eHMK0mCA0YKD8u++7sprmhwCHsoQIBpSf0vp6kVMHBmafknr1Z6K7IC5jIjsNL9Q==", "dev": true, "requires": { "azure-devops-node-api": "^7.2.0", diff --git a/package.json b/package.json index 31d92ed..456a3dc 100755 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "tiny-invariant": "^1.1.0", "tslint": "^5.16.0", "typescript": "^3.8.3", - "vsce": "^1.75.0", + "vsce": "^1.76.1", "vscode-emmet-helper-bundled": "0.0.1", "vscode-languageclient": "^5.2.1", "vscode-languageserver": "^5.2.1",