提交 4c89a268 编写于 作者: P Pine Wu

Fix CSS imports

上级 2c1040da
......@@ -23,8 +23,7 @@
"outFiles": [
"${workspaceFolder}/client/out/**/*.js"
],
"smartStep": true,
"preLaunchTask": "npm: compile"
"smartStep": true
},
{
"name": "Launch Tests",
......@@ -39,8 +38,7 @@
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/client/out/test/**/*.js"
],
"preLaunchTask": "npm: compile"
]
},
{
"name": "Attach Language Server",
......
......@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { CSSData, ICSSDataProvider } from 'vscode-css-languageservice';
import { CSSDataV1, ICSSDataProvider } from 'vscode-css-languageservice';
import * as fs from 'fs';
export function getDataProviders(dataPaths: string[]): ICSSDataProvider[] {
......@@ -29,16 +29,19 @@ export function getDataProviders(dataPaths: string[]): ICSSDataProvider[] {
return providers;
}
function parseCSSData(source: string): CSSData {
function parseCSSData(source: string): CSSDataV1 {
let rawData: any;
try {
rawData = JSON.parse(source);
} catch (err) {
return {};
return {
version: 1
};
}
return {
version: 1,
properties: rawData.properties || [],
atDirectives: rawData.atdirectives || [],
pseudoClasses: rawData.pseudoclasses || [],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册