diff --git a/.gitignore b/.gitignore index 1eb14b3..d12b1d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ **/*.vsix **/*.js.map node_modules -client +dist .vscode .DS_STORE +package-lock.json \ No newline at end of file diff --git a/.vscodeignore b/.vscodeignore index 3fdf4b1..a5da763 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -1,6 +1,6 @@ **/*.ts **/tsconfig.json -server/** +src/** tests/** .vscode/** .gitignore diff --git a/package.json b/package.json index 022e2a6..9ab6bbb 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,10 @@ "name": "string-html-css", "displayName": "string-html-css", "description": "一个高亮js代码中的 html/css/scss/sass/less的字符串, 并支持emmet.", - "version": "1.0.0", + "version": "1.0.1", "publisher": "yutent", "license": "MIT", - "icon": "docs/logo.png", + "icon": "assets/logo.png", "bugs": { "url": "https://github.com/yutent/vscode-string-html/issues" }, @@ -24,9 +24,8 @@ "vscode": "^1.22.0" }, "scripts": { - "compile": "npx tsc -p .", - "watch:compile": "npx tsc --watch -p .", - "package": "npx vsce package" + "start": "npx tsc --watch -p .", + "build": "npx tsc -p ." }, "categories": [ "Programming Languages" @@ -116,7 +115,6 @@ "@types/node": "7.0.43", "@types/vscode": "^1.22.0", "typescript": "^3.2.2", - "vsce": "^1.102.0", "vscode-languageserver-types": "^3.6.0" }, "dependencies": { diff --git a/src/providers/css.ts b/src/providers/css.ts index c8395f6..499e6f6 100644 --- a/src/providers/css.ts +++ b/src/providers/css.ts @@ -14,7 +14,7 @@ import { } from 'vscode-html-languageservice' import { - getCSSLanguageService as GetCSSLanguageService, + getSCSSLanguageService as GetSCSSLanguageService, LanguageService as CSSLanguageService, CompletionList as CSSCompletionList } from 'vscode-css-languageservice' @@ -32,7 +32,7 @@ import { import { CompletionsCache } from '../cache' export class HTMLStyleCompletionItemProvider implements CompletionItemProvider { - private _cssLanguageService: CSSLanguageService = GetCSSLanguageService() + private _cssLanguageService: CSSLanguageService = GetSCSSLanguageService() private _HTMLanguageService: HTMLanguageService = GetHTMLanguageService() private _expression = /(\/\*\s*html\s*\*\/\s*`|html\s*`)([^`]*)(`)/g private _cache = new CompletionsCache() @@ -130,9 +130,9 @@ export class HTMLStyleCompletionItemProvider implements CompletionItemProvider { } export class CSSCompletionItemProvider implements CompletionItemProvider { - private _CSSLanguageService: CSSLanguageService = GetCSSLanguageService() + private _CSSLanguageService: CSSLanguageService = GetSCSSLanguageService() private _expression = - /(\/\*\s*(css|less|scss|sass)\s*\*\/\s*`|(scss|sass|less|css)\s*`)([^`]*)(`)/g + /(\/\*\s*(css|less|scss|sass)\s*\*\/\s*`|css\s*`)([^`]*)(`)/g private _cache = new CompletionsCache() public provideCompletionItems( diff --git a/src/providers/formatting.ts b/src/providers/formatting.ts index 5288b60..8860bd2 100644 --- a/src/providers/formatting.ts +++ b/src/providers/formatting.ts @@ -12,7 +12,6 @@ import { import { getLanguageService as GetHTMLanguageService, - TextDocument as HTMLTextDocument, Position as HTMLPosition } from 'vscode-html-languageservice' diff --git a/syntaxes/es6.inline.css.json b/syntaxes/es6.inline.css.json index af2f3a0..edba048 100644 --- a/syntaxes/es6.inline.css.json +++ b/syntaxes/es6.inline.css.json @@ -24,7 +24,7 @@ "include": "source.ts#template-substitution-element" }, { - "include": "source.css" + "include": "source.css.scss" } ] },