Skip to content

Commit 5d5f186

Browse files
committed
feat: initial coding
1 parent bcbcf09 commit 5d5f186

File tree

11 files changed

+235
-84
lines changed

11 files changed

+235
-84
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@
22

33
float-pigment-css diagnostic information for Visual Studio Code
44

5+
56
## Features
67

78
This extension provides float-pigment-css diagnostics for WXSS files.
89

910
To support WXSS files, `glass-easel-analyzer` extension should be installed.
1011

11-
It can also show diagnostic information for CSS files through `float-pigment-css-analyzer.enabledForCSS` configuration.
1212

1313
## Extension Settings
1414

15-
* `float-pigment-css-analyzer.restart`: Restart language server.
15+
All configurations are under `glass-easel-analyzer.*`.
16+
17+
By default, it will be enabled when certain `"renderer"` is set in `app.json` or `[COMPONENT].json`.
18+
19+
To show diagnostic information for CSS files, turn on the `float-pigment-css-analyzer.enabledForCSS` configuration.
20+
1621

1722
## Release Notes
1823

19-
### 1.0.0
24+
### 0.1.0
2025

21-
Initial release (work in progress).
26+
Basic Features.

package-lock.json

Lines changed: 77 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "float-pigment-css-analyzer",
44
"publisher": "wechat-miniprogram",
55
"description": "float-pigment-css diagnostic information for Visual Studio Code",
6-
"version": "0.3.0-alpha.1",
6+
"version": "0.1.0",
77
"license": "MIT",
88
"engines": {
99
"vscode": "^1.61.0"
@@ -26,15 +26,35 @@
2626
"onLanguage:css"
2727
],
2828
"contributes": {
29+
"commands": [
30+
{
31+
"command": "float-pigment-css-analyzer.restart",
32+
"title": "Restart float-pigment-css-analyzer"
33+
}
34+
],
2935
"configuration": {
3036
"type": "object",
3137
"title": "float-pigment-css-analyzer",
3238
"properties": {
3339
"float-pigment-css-analyzer.enabled": {
3440
"scope": "window",
35-
"type": "boolean",
36-
"default": true,
37-
"description": "Enable this language extension (can be set per workspace)."
41+
"enum": [
42+
"renderer",
43+
"always",
44+
"never"
45+
],
46+
"default": "renderer",
47+
"description": "When to enable the diagnostic information (can be set per workspace)."
48+
},
49+
"float-pigment-css-analyzer.renderer": {
50+
"scope": "window",
51+
"type": "array",
52+
"default": [
53+
"float-pigment",
54+
"skyline",
55+
"rect-palette"
56+
],
57+
"description": "The \"renderer\" field in `app.json` or `[COMPONENT].json` that enables the diagnostic information."
3858
},
3959
"float-pigment-css-analyzer.enabledForCSS": {
4060
"scope": "window",
@@ -46,26 +66,27 @@
4666
}
4767
},
4868
"scripts": {
49-
"vscode:prepublish": "pnpm run package",
69+
"vscode:prepublish": "npm run package",
5070
"compile": "webpack",
5171
"watch": "webpack --watch",
5272
"package": "webpack --mode production --devtool hidden-source-map",
5373
"compile-tests": "tsc -p . --outDir out",
5474
"watch-tests": "tsc -p . -w --outDir out",
55-
"pretest": "cargo build && pnpm run compile-tests && pnpm run compile && pnpm run lint",
75+
"pretest": "npm run compile-tests && npm run compile && npm run lint",
5676
"lint": "eslint src",
5777
"test": "vscode-test"
5878
},
5979
"devDependencies": {
60-
"@vscode/test-cli": "^0.0.10",
61-
"@vscode/test-electron": "^2.4.1",
6280
"@types/assert": "^1.5.11",
6381
"@types/diff": "^7.0.0",
6482
"@types/mocha": "^10.0.9",
6583
"@types/node": "~22.9.0",
6684
"@types/vscode": "^1.61.0",
6785
"@typescript-eslint/eslint-plugin": "^6.6.0",
6886
"@typescript-eslint/parser": "^6.6.0",
87+
"@vscode/test-cli": "^0.0.10",
88+
"@vscode/test-electron": "^2.4.1",
89+
"assert": "^2.1.0",
6990
"eslint": "^7.17.0",
7091
"eslint-config-airbnb-base": "^14.2.1",
7192
"eslint-config-prettier": "^8.6.0",
@@ -74,7 +95,6 @@
7495
"eslint-plugin-promise": "^4.2.1",
7596
"float-pigment-css": "^0.3.0",
7697
"prettier": "^2.8.3",
77-
"pretty-format": "^29.7.0",
7898
"ts-loader": "^9.5.1",
7999
"ts-node": "^10.9.2",
80100
"typescript": "~5.2.2",

0 commit comments

Comments
 (0)