@tomjs/vite-plugin-vscode 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/README.zh_CN.md +9 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
> The [vite](https://cn.vitejs.dev/) plugin for [vscode extension](https://code.visualstudio.com/api), supports `esm` and `cjs`.
|
|
8
8
|
|
|
9
|
-
Inject [@tomjs/vscode-extension-webview](https://github.com/
|
|
9
|
+
Inject [@tomjs/vscode-extension-webview](https://github.com/tomjs/vscode-extension-webview) into vscode extension code and web client code, so that webview can support HMR during the development stage.
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
@@ -29,6 +29,12 @@ yarn add @tomjs/vite-plugin-vscode -D
|
|
|
29
29
|
npm i @tomjs/vite-plugin-vscode --save-dev
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
If you use `pnpm` and enable `webview` debugging, you need to additionally install the dependency [@tomjs/vscode-extension-webview](https://github.com/tomjs/vscode-extension-webview)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pnpm add @tomjs/vscode-extension-webview -D
|
|
36
|
+
```
|
|
37
|
+
|
|
32
38
|
## Usage
|
|
33
39
|
|
|
34
40
|
### Recommended Agreement
|
|
@@ -183,7 +189,7 @@ export default defineConfig({
|
|
|
183
189
|
| --- | --- | --- | --- |
|
|
184
190
|
| recommended | `boolean` | `true` | This option is intended to provide recommended default parameters and behavior. |
|
|
185
191
|
| extension | [ExtensionOptions](#ExtensionOptions) | | Configuration options for the vscode extension. |
|
|
186
|
-
| webview | `boolean` | `false` | Inject [@tomjs/vscode-extension-webview](https://github.com/
|
|
192
|
+
| webview | `boolean` | `false` | Inject [@tomjs/vscode-extension-webview](https://github.com/tomjs/vscode-extension-webview) into vscode extension code and web client code, so that webview can support HMR during the development stage. |
|
|
187
193
|
|
|
188
194
|
**Notice**
|
|
189
195
|
|
package/README.zh_CN.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
> [vscode extension](https://code.visualstudio.com/api) 的 [vite](https://cn.vitejs.dev/) 插件,支持 `esm` 和 `cjs`。
|
|
8
8
|
|
|
9
|
-
给 vscode 扩展代码和 web 客户端代码中注入 [@tomjs/vscode-extension-webview](https://github.com/
|
|
9
|
+
给 vscode 扩展代码和 web 客户端代码中注入 [@tomjs/vscode-extension-webview](https://github.com/tomjs/vscode-extension-webview),可以让 webview 在开发阶段支持 `HMR`
|
|
10
10
|
|
|
11
11
|
## 特性
|
|
12
12
|
|
|
@@ -29,6 +29,12 @@ yarn add @tomjs/vite-plugin-vscode -D
|
|
|
29
29
|
npm i @tomjs/vite-plugin-vscode --save-dev
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
如果使用 `pnpm` 且开启 `webview` 调试,需要额外安装[@tomjs/vscode-extension-webview](https://github.com/tomjs/vscode-extension-webview) 这个依赖
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pnpm add @tomjs/vscode-extension-webview -D
|
|
36
|
+
```
|
|
37
|
+
|
|
32
38
|
## 使用说明
|
|
33
39
|
|
|
34
40
|
### 推荐约定
|
|
@@ -183,7 +189,7 @@ export default defineConfig({
|
|
|
183
189
|
| --- | --- | --- | --- |
|
|
184
190
|
| recommended | `boolean` | `true` | 这个选项是为了提供推荐的默认参数和行为 |
|
|
185
191
|
| extension | [ExtensionOptions](#ExtensionOptions) | | vscode extension 可选配置 |
|
|
186
|
-
| webview | `boolean` | `false` | 在vscode扩展代码和Web客户端代码中注入[@tomjs/vscode-extension-webview](https://github.com/
|
|
192
|
+
| webview | `boolean` | `false` | 在vscode扩展代码和Web客户端代码中注入[@tomjs/vscode-extension-webview](https://github.com/tomjs/vscode-extension-webview),以便webview在开发阶段可以支持HMR。 |
|
|
187
193
|
|
|
188
194
|
**Notice**
|
|
189
195
|
|
|
@@ -222,7 +228,7 @@ export default defineConfig({
|
|
|
222
228
|
|
|
223
229
|
## Debug
|
|
224
230
|
|
|
225
|
-
通过 `vscode` 运行 `
|
|
231
|
+
通过 `vscode` 运行 `Run Extension` 调试,调试工具参考 [官方文档](https://code.visualstudio.com/docs/editor/debugging)
|
|
226
232
|
|
|
227
233
|
`launch.json` 配置如下:
|
|
228
234
|
|
package/dist/index.d.mts
CHANGED
|
@@ -37,7 +37,7 @@ interface PluginOptions {
|
|
|
37
37
|
*/
|
|
38
38
|
recommended?: boolean;
|
|
39
39
|
/**
|
|
40
|
-
* Inject [@tomjs/vscode-extension-webview](https://github.com/
|
|
40
|
+
* Inject [@tomjs/vscode-extension-webview](https://github.com/tomjs/vscode-extension-webview) into vscode extension code and web client code, so that webview can support HMR during the development stage.
|
|
41
41
|
*
|
|
42
42
|
* * extension: Inject `import getDevWebviewHtml from '@tomjs/vscode-extension-webview';` above the file that calls the `getDevWebviewHtml` method
|
|
43
43
|
* * web: Add `<script>` tag to index.html and inject `@tomjs/vscode-extension-webview/client` code
|
package/dist/index.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ interface PluginOptions {
|
|
|
37
37
|
*/
|
|
38
38
|
recommended?: boolean;
|
|
39
39
|
/**
|
|
40
|
-
* Inject [@tomjs/vscode-extension-webview](https://github.com/
|
|
40
|
+
* Inject [@tomjs/vscode-extension-webview](https://github.com/tomjs/vscode-extension-webview) into vscode extension code and web client code, so that webview can support HMR during the development stage.
|
|
41
41
|
*
|
|
42
42
|
* * extension: Inject `import getDevWebviewHtml from '@tomjs/vscode-extension-webview';` above the file that calls the `getDevWebviewHtml` method
|
|
43
43
|
* * web: Add `<script>` tag to index.html and inject `@tomjs/vscode-extension-webview/client` code
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomjs/vite-plugin-vscode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "The vite plugin for vscode extension, supports esm and cjs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
},
|
|
39
39
|
"repository": {
|
|
40
40
|
"type": "git",
|
|
41
|
-
"url": "git+https://github.com/
|
|
41
|
+
"url": "git+https://github.com/tomjs/vite-plugin-vscode.git"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@tomjs/vscode-extension-webview": "^1.0.
|
|
44
|
+
"@tomjs/vscode-extension-webview": "^1.0.3",
|
|
45
45
|
"dayjs": "^1.11.10",
|
|
46
46
|
"kolorist": "^1.8.0",
|
|
47
47
|
"lodash.clonedeep": "^4.5.0",
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@commitlint/cli": "^18.4.3",
|
|
53
|
-
"@tomjs/commitlint": "^2.
|
|
54
|
-
"@tomjs/eslint": "^1.1
|
|
55
|
-
"@tomjs/prettier": "^1.
|
|
56
|
-
"@tomjs/stylelint": "^2.
|
|
57
|
-
"@tomjs/tsconfig": "^1.1
|
|
53
|
+
"@tomjs/commitlint": "^2.1.1",
|
|
54
|
+
"@tomjs/eslint": "^1.2.1",
|
|
55
|
+
"@tomjs/prettier": "^1.1.1",
|
|
56
|
+
"@tomjs/stylelint": "^2.1.1",
|
|
57
|
+
"@tomjs/tsconfig": "^1.2.1",
|
|
58
58
|
"@types/lodash.clonedeep": "^4.5.9",
|
|
59
59
|
"@types/lodash.merge": "^4.6.9",
|
|
60
60
|
"@types/node": "^18.19.3",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"prettier": "^3.1.1",
|
|
68
68
|
"rimraf": "^5.0.5",
|
|
69
69
|
"stylelint": "^16.0.2",
|
|
70
|
-
"tsx": "^4.
|
|
70
|
+
"tsx": "^4.7.0",
|
|
71
71
|
"typescript": "~5.3.3"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|