code-inspector-plugin 0.8.1-beta.2 → 0.8.1

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.
Files changed (4) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +254 -254
  3. package/package.json +4 -4
  4. package/types/index.d.ts +15 -15
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 zhoulixiang
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2022 zhoulixiang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,254 +1,254 @@
1
- <div align="center">
2
- <img src="https://github.com/zh-lx/code-inspector/assets/73059627/842c3e88-dca7-4743-854c-d61093d3d34f" width=160px" style="margin-bottom: 12px;" />
3
-
4
- <p align="center">
5
- <h2>code-inspector</h2>
6
- <span>English Docs</span> | <a href="https://github.com/zh-lx/code-inspector/blob/main/docs/README-ZH.md">中文文档</a> | <a href="https://inspector.fe-dev.cn/en">Documentation Site</a>
7
- </p>
8
-
9
- [![NPM version](https://img.shields.io/npm/v/code-inspector-plugin.svg)](https://www.npmjs.com/package/code-inspector-plugin)
10
- [![GITHUB star](https://img.shields.io/github/stars/zh-lx/code-inspector.svg)](https://github.com/zh-lx/code-inspector)
11
- [![MIT-license](https://img.shields.io/npm/l/code-inspector.svg)](https://opensource.org/licenses/MIT)
12
-
13
- </div>
14
-
15
- <hr />
16
-
17
- ## 📖 Introduction
18
-
19
- Click the element on the page, it can automatically open the code editor and position the cursor to the source code of the element.
20
-
21
- ![code-inspector](https://github.com/zh-lx/code-inspector/assets/73059627/ad7974e6-e8b5-4bda-a005-d8387108e997)
22
-
23
- ## 💻 Try it out online
24
-
25
- - [vue online demo](https://stackblitz.com/edit/vitejs-vite-4pseos?file=vite.config.ts)
26
- - [react online demo](https://stackblitz.com/edit/vitejs-vite-svtwrr?file=vite.config.ts)
27
- - [preact online demo](https://stackblitz.com/edit/vitejs-vite-iyawbf?file=vite.config.ts)
28
- - [solid online demo](https://stackblitz.com/edit/solidjs-templates-6u76jn?file=vite.config.ts)
29
- - [svelte online demo](https://stackblitz.com/edit/vitejs-vite-zoncqr?file=vite.config.ts)
30
-
31
- ## 🎨 Support
32
-
33
- The following are which compilers, web frameworks and editors we supported now:
34
-
35
- - The following bundlers are currently supported:<br />
36
- ✅ webpack<br />
37
- ✅ vite<br />
38
- ✅ rspack<br />
39
- ✅ nextjs / nuxt / umijs eg.<br />
40
- - The following Web frameworks are currently supported:<br />
41
- ✅ vue2<br />
42
- ✅ vue3<br />
43
- ✅ react<br />
44
- ✅ preact<br />
45
- ✅ solid<br />
46
- ✅ svelte
47
- - The following code editors are currently supported:<br />
48
- [VSCode](https://code.visualstudio.com/) | [Visual Studio Code - Insiders](https://code.visualstudio.com/insiders/) | [WebStorm](https://www.jetbrains.com/webstorm/) | [Atom](https://atom.io/) | [HBuilderX](https://www.dcloud.io/hbuilderx.html) | [PhpStorm](https://www.jetbrains.com/phpstorm/) | [PyCharm](https://www.jetbrains.com/pycharm/) | [IntelliJ IDEA](https://www.jetbrains.com/idea/)
49
-
50
- ## 🚀 Install
51
-
52
- ```perl
53
- npm i code-inspector-plugin -D
54
- # or
55
- yarn add code-inspector-plugin -D
56
- # or
57
- pnpm add code-inspector-plugin -D
58
- ```
59
-
60
- ## 🌈 Usage
61
-
62
- Please check here for more usage information: [code-inspector-plugin configuration](https://en.inspector.fe-dev.cn/guide/start.html#configuration)
63
-
64
- - 1.Configuring Build Tools
65
-
66
- <details>
67
- <summary>Click to expand configuration about: <b>webpack</b></summary>
68
-
69
- ```js
70
- // webpack.config.js
71
- const { codeInspectorPlugin } = require('code-inspector-plugin');
72
-
73
- module.exports = () => ({
74
- plugins: [
75
- codeInspectorPlugin({
76
- bundler: 'webpack',
77
- }),
78
- ],
79
- });
80
- ```
81
-
82
- </details>
83
-
84
- <details>
85
- <summary>Click to expand configuration about: <b>vite</b></summary>
86
-
87
- ```js
88
- // vite.config.js
89
- import { defineConfig } from 'vite';
90
- import { codeInspectorPlugin } from 'code-inspector-plugin';
91
-
92
- export default defineConfig({
93
- plugins: [
94
- codeInspectorPlugin({
95
- bundler: 'vite',
96
- }),
97
- ],
98
- });
99
- ```
100
-
101
- </details>
102
-
103
- <details>
104
- <summary>Click to expand configuration about: <b>rspack</b></summary>
105
-
106
- ```js
107
- // rspack.config.js
108
- const { codeInspectorPlugin } = require('code-inspector-plugin');
109
-
110
- module.exports = {
111
- // other config...
112
- plugins: [
113
- codeInspectorPlugin({
114
- bundler: 'rspack',
115
- }),
116
- // other plugins...
117
- ],
118
- };
119
- ```
120
-
121
- </details>
122
-
123
- <details>
124
- <summary>Click to expand configuration about: <b>vue-cli</b></summary>
125
-
126
- ```js
127
- // vue.config.js
128
- const { codeInspectorPlugin } = require('code-inspector-plugin');
129
-
130
- module.exports = {
131
- // ...other code
132
- chainWebpack: (config) => {
133
- config.plugin('code-inspector-plugin').use(
134
- codeInspectorPlugin({
135
- bundler: 'webpack',
136
- })
137
- );
138
- },
139
- };
140
- ```
141
-
142
- </details>
143
-
144
- <details>
145
- <summary>Click to expand configuration about: <b>nuxt</b></summary>
146
-
147
- For nuxt3.x :
148
-
149
- ```js
150
- // nuxt.config.js
151
- import { codeInspectorPlugin } from 'code-inspector-plugin';
152
-
153
- // https://nuxt.com/docs/api/configuration/nuxt-config
154
- export default defineNuxtConfig({
155
- vite: {
156
- plugins: [codeInspectorPlugin({ bundler: 'vite' })],
157
- },
158
- });
159
- ```
160
-
161
- For nuxt2.x :
162
-
163
- ```js
164
- // nuxt.config.js
165
- import { codeInspectorPlugin } from 'code-inspector-plugin';
166
-
167
- export default {
168
- build: {
169
- extend(config) {
170
- config.plugins.push(codeInspectorPlugin({ bundler: 'webpack' }));
171
- return config;
172
- },
173
- },
174
- };
175
- ```
176
-
177
- </details>
178
-
179
- <details>
180
- <summary>Click to expand configuration about: <b>next.js</b></summary>
181
-
182
- ```js
183
- // next.config.js
184
- const { codeInspectorPlugin } = require('code-inspector-plugin');
185
-
186
- const nextConfig = {
187
- webpack: (config, { dev, isServer }) => {
188
- config.plugins.push(codeInspectorPlugin({ bundler: 'webpack' }));
189
- return config;
190
- },
191
- };
192
-
193
- module.exports = nextConfig;
194
- ```
195
-
196
- </details>
197
-
198
- <details>
199
- <summary>Click to expand configuration about: <b>umi.js</b></summary>
200
-
201
- ```js
202
- // umi.config.js or umirc.js
203
- import { defineConfig } from '@umijs/max';
204
- import { codeInspectorPlugin } from 'code-inspector-plugin';
205
-
206
- export default defineConfig({
207
- chainWebpack(memo) {
208
- memo.plugin('code-inspector-plugin').use(
209
- codeInspectorPlugin({
210
- bundler: 'webpack',
211
- })
212
- );
213
- },
214
- // other config
215
- });
216
- ```
217
-
218
- </details>
219
-
220
- - 2.Configuring VSCode Command Line Tool
221
-
222
- > **Tip:** Skip for Windows or other IDEs <br />
223
- > This step is only required for Mac with vscode as IDE. Skip this step if your computer is Windows or if you use another IDE.
224
-
225
- In VSCode, press `command + shift + p`, search for and click `Shell Command: Install 'code' command in PATH`:
226
-
227
- <img src="https://s3.bmp.ovh/imgs/2021/08/a99ec7b8e93f55fd.png" width="400px" />
228
-
229
- If you see the dialog box below, the configuration was successful:
230
-
231
- <img src="https://s3.bmp.ovh/imgs/2021/08/c3d00a8efbb20feb.png" width="300px" />
232
-
233
- - 3.Enjoy using it
234
-
235
- When pressing the combination keys on the page, moving the mouse over the page will display a mask layer on the DOM with relevant information. Clicking will automatically open the IDE and position the cursor to the corresponding code location. (The default combination keys for Mac are `Option + Shift`; for Windows, it's `Alt + Shift`, and the browser console will output related combination key prompts)
236
-
237
- <img src="https://github.com/zh-lx/code-inspector/assets/73059627/a6c72278-d312-45b2-ab76-076a9837439e" width="700px" />
238
-
239
- ## 👨‍💻 Contributors
240
-
241
- Special thanks to the contributors of this project:<br />
242
- <img src="https://contrib.rocks/image?repo=zh-lx/code-inspector" />
243
-
244
- ## 📧 Communication and Feedback
245
-
246
- For any usage issues, please leave a message below my [Twitter](https://twitter.com/zhulxing312147) post or [submit an issue](https://github.com/zh-lx/code-inspector/issues) on Github.
247
-
248
- For Chinese users, you can you can join the QQ group `769748484` add the author's WeiXin account `zhoulx1688888` for consultation and feedback:
249
-
250
- <div style="display: flex; column-gap: 16px; row-gap: 16px; flex-wrap: wrap;">
251
- <img src="https://github.com/zh-lx/code-inspector/assets/73059627/6f0c8197-21e3-48d7-b9db-ffeb0e0d4ba7" width="200" height="272" />
252
- <img src="https://github.com/zh-lx/code-inspector/assets/73059627/ce4e8328-a787-44f8-af9c-2331b73cffea" width="200" height="272" />
253
- <img src="https://github.com/zh-lx/code-inspector/assets/73059627/28ebb97a-a114-4598-a6f2-0e45103284cc" width="200" height="272" />
254
- </div>
1
+ <div align="center">
2
+ <img src="https://github.com/zh-lx/code-inspector/assets/73059627/842c3e88-dca7-4743-854c-d61093d3d34f" width=160px" style="margin-bottom: 12px;" />
3
+
4
+ <p align="center">
5
+ <h2>code-inspector</h2>
6
+ <span>English Docs</span> | <a href="https://github.com/zh-lx/code-inspector/blob/main/docs/README-ZH.md">中文文档</a> | <a href="https://inspector.fe-dev.cn/en">Documentation Site</a>
7
+ </p>
8
+
9
+ [![NPM version](https://img.shields.io/npm/v/code-inspector-plugin.svg)](https://www.npmjs.com/package/code-inspector-plugin)
10
+ [![GITHUB star](https://img.shields.io/github/stars/zh-lx/code-inspector.svg)](https://github.com/zh-lx/code-inspector)
11
+ [![MIT-license](https://img.shields.io/npm/l/code-inspector.svg)](https://opensource.org/licenses/MIT)
12
+
13
+ </div>
14
+
15
+ <hr />
16
+
17
+ ## 📖 Introduction
18
+
19
+ Click the element on the page, it can automatically open the code editor and position the cursor to the source code of the element.
20
+
21
+ ![code-inspector](https://github.com/zh-lx/code-inspector/assets/73059627/ad7974e6-e8b5-4bda-a005-d8387108e997)
22
+
23
+ ## 💻 Try it out online
24
+
25
+ - [vue online demo](https://stackblitz.com/edit/vitejs-vite-4pseos?file=vite.config.ts)
26
+ - [react online demo](https://stackblitz.com/edit/vitejs-vite-svtwrr?file=vite.config.ts)
27
+ - [preact online demo](https://stackblitz.com/edit/vitejs-vite-iyawbf?file=vite.config.ts)
28
+ - [solid online demo](https://stackblitz.com/edit/solidjs-templates-6u76jn?file=vite.config.ts)
29
+ - [svelte online demo](https://stackblitz.com/edit/vitejs-vite-zoncqr?file=vite.config.ts)
30
+
31
+ ## 🎨 Support
32
+
33
+ The following are which compilers, web frameworks and editors we supported now:
34
+
35
+ - The following bundlers are currently supported:<br />
36
+ ✅ webpack<br />
37
+ ✅ vite<br />
38
+ ✅ rspack<br />
39
+ ✅ nextjs / nuxt / umijs eg.<br />
40
+ - The following Web frameworks are currently supported:<br />
41
+ ✅ vue2<br />
42
+ ✅ vue3<br />
43
+ ✅ react<br />
44
+ ✅ preact<br />
45
+ ✅ solid<br />
46
+ ✅ svelte
47
+ - The following code editors are currently supported:<br />
48
+ [VSCode](https://code.visualstudio.com/) | [Visual Studio Code - Insiders](https://code.visualstudio.com/insiders/) | [WebStorm](https://www.jetbrains.com/webstorm/) | [Atom](https://atom.io/) | [HBuilderX](https://www.dcloud.io/hbuilderx.html) | [PhpStorm](https://www.jetbrains.com/phpstorm/) | [PyCharm](https://www.jetbrains.com/pycharm/) | [IntelliJ IDEA](https://www.jetbrains.com/idea/)
49
+
50
+ ## 🚀 Install
51
+
52
+ ```perl
53
+ npm i code-inspector-plugin -D
54
+ # or
55
+ yarn add code-inspector-plugin -D
56
+ # or
57
+ pnpm add code-inspector-plugin -D
58
+ ```
59
+
60
+ ## 🌈 Usage
61
+
62
+ Please check here for more usage information: [code-inspector-plugin configuration](https://en.inspector.fe-dev.cn/guide/start.html#configuration)
63
+
64
+ - 1.Configuring Build Tools
65
+
66
+ <details>
67
+ <summary>Click to expand configuration about: <b>webpack</b></summary>
68
+
69
+ ```js
70
+ // webpack.config.js
71
+ const { codeInspectorPlugin } = require('code-inspector-plugin');
72
+
73
+ module.exports = () => ({
74
+ plugins: [
75
+ codeInspectorPlugin({
76
+ bundler: 'webpack',
77
+ }),
78
+ ],
79
+ });
80
+ ```
81
+
82
+ </details>
83
+
84
+ <details>
85
+ <summary>Click to expand configuration about: <b>vite</b></summary>
86
+
87
+ ```js
88
+ // vite.config.js
89
+ import { defineConfig } from 'vite';
90
+ import { codeInspectorPlugin } from 'code-inspector-plugin';
91
+
92
+ export default defineConfig({
93
+ plugins: [
94
+ codeInspectorPlugin({
95
+ bundler: 'vite',
96
+ }),
97
+ ],
98
+ });
99
+ ```
100
+
101
+ </details>
102
+
103
+ <details>
104
+ <summary>Click to expand configuration about: <b>rspack</b></summary>
105
+
106
+ ```js
107
+ // rspack.config.js
108
+ const { codeInspectorPlugin } = require('code-inspector-plugin');
109
+
110
+ module.exports = {
111
+ // other config...
112
+ plugins: [
113
+ codeInspectorPlugin({
114
+ bundler: 'rspack',
115
+ }),
116
+ // other plugins...
117
+ ],
118
+ };
119
+ ```
120
+
121
+ </details>
122
+
123
+ <details>
124
+ <summary>Click to expand configuration about: <b>vue-cli</b></summary>
125
+
126
+ ```js
127
+ // vue.config.js
128
+ const { codeInspectorPlugin } = require('code-inspector-plugin');
129
+
130
+ module.exports = {
131
+ // ...other code
132
+ chainWebpack: (config) => {
133
+ config.plugin('code-inspector-plugin').use(
134
+ codeInspectorPlugin({
135
+ bundler: 'webpack',
136
+ })
137
+ );
138
+ },
139
+ };
140
+ ```
141
+
142
+ </details>
143
+
144
+ <details>
145
+ <summary>Click to expand configuration about: <b>nuxt</b></summary>
146
+
147
+ For nuxt3.x :
148
+
149
+ ```js
150
+ // nuxt.config.js
151
+ import { codeInspectorPlugin } from 'code-inspector-plugin';
152
+
153
+ // https://nuxt.com/docs/api/configuration/nuxt-config
154
+ export default defineNuxtConfig({
155
+ vite: {
156
+ plugins: [codeInspectorPlugin({ bundler: 'vite' })],
157
+ },
158
+ });
159
+ ```
160
+
161
+ For nuxt2.x :
162
+
163
+ ```js
164
+ // nuxt.config.js
165
+ import { codeInspectorPlugin } from 'code-inspector-plugin';
166
+
167
+ export default {
168
+ build: {
169
+ extend(config) {
170
+ config.plugins.push(codeInspectorPlugin({ bundler: 'webpack' }));
171
+ return config;
172
+ },
173
+ },
174
+ };
175
+ ```
176
+
177
+ </details>
178
+
179
+ <details>
180
+ <summary>Click to expand configuration about: <b>next.js</b></summary>
181
+
182
+ ```js
183
+ // next.config.js
184
+ const { codeInspectorPlugin } = require('code-inspector-plugin');
185
+
186
+ const nextConfig = {
187
+ webpack: (config, { dev, isServer }) => {
188
+ config.plugins.push(codeInspectorPlugin({ bundler: 'webpack' }));
189
+ return config;
190
+ },
191
+ };
192
+
193
+ module.exports = nextConfig;
194
+ ```
195
+
196
+ </details>
197
+
198
+ <details>
199
+ <summary>Click to expand configuration about: <b>umi.js</b></summary>
200
+
201
+ ```js
202
+ // umi.config.js or umirc.js
203
+ import { defineConfig } from '@umijs/max';
204
+ import { codeInspectorPlugin } from 'code-inspector-plugin';
205
+
206
+ export default defineConfig({
207
+ chainWebpack(memo) {
208
+ memo.plugin('code-inspector-plugin').use(
209
+ codeInspectorPlugin({
210
+ bundler: 'webpack',
211
+ })
212
+ );
213
+ },
214
+ // other config
215
+ });
216
+ ```
217
+
218
+ </details>
219
+
220
+ - 2.Configuring VSCode Command Line Tool
221
+
222
+ > **Tip:** Skip for Windows or other IDEs <br />
223
+ > This step is only required for Mac with vscode as IDE. Skip this step if your computer is Windows or if you use another IDE.
224
+
225
+ In VSCode, press `command + shift + p`, search for and click `Shell Command: Install 'code' command in PATH`:
226
+
227
+ <img src="https://s3.bmp.ovh/imgs/2021/08/a99ec7b8e93f55fd.png" width="400px" />
228
+
229
+ If you see the dialog box below, the configuration was successful:
230
+
231
+ <img src="https://s3.bmp.ovh/imgs/2021/08/c3d00a8efbb20feb.png" width="300px" />
232
+
233
+ - 3.Enjoy using it
234
+
235
+ When pressing the combination keys on the page, moving the mouse over the page will display a mask layer on the DOM with relevant information. Clicking will automatically open the IDE and position the cursor to the corresponding code location. (The default combination keys for Mac are `Option + Shift`; for Windows, it's `Alt + Shift`, and the browser console will output related combination key prompts)
236
+
237
+ <img src="https://github.com/zh-lx/code-inspector/assets/73059627/a6c72278-d312-45b2-ab76-076a9837439e" width="700px" />
238
+
239
+ ## 👨‍💻 Contributors
240
+
241
+ Special thanks to the contributors of this project:<br />
242
+ <img src="https://contrib.rocks/image?repo=zh-lx/code-inspector" />
243
+
244
+ ## 📧 Communication and Feedback
245
+
246
+ For any usage issues, please leave a message below my [Twitter](https://twitter.com/zhulxing312147) post or [submit an issue](https://github.com/zh-lx/code-inspector/issues) on Github.
247
+
248
+ For Chinese users, you can you can join the QQ group `769748484` add the author's WeiXin account `zhoulx1688888` for consultation and feedback:
249
+
250
+ <div style="display: flex; column-gap: 16px; row-gap: 16px; flex-wrap: wrap;">
251
+ <img src="https://github.com/zh-lx/code-inspector/assets/73059627/6f0c8197-21e3-48d7-b9db-ffeb0e0d4ba7" width="200" height="272" />
252
+ <img src="https://github.com/zh-lx/code-inspector/assets/73059627/ce4e8328-a787-44f8-af9c-2331b73cffea" width="200" height="272" />
253
+ <img src="https://github.com/zh-lx/code-inspector/assets/73059627/28ebb97a-a114-4598-a6f2-0e45103284cc" width="200" height="272" />
254
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-inspector-plugin",
3
- "version": "0.8.1-beta.2",
3
+ "version": "0.8.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "typings": "./types/index.d.ts",
@@ -39,9 +39,9 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "chalk": "4.1.1",
42
- "code-inspector-core": "0.8.1-beta.2",
43
- "vite-code-inspector-plugin": "0.8.1-beta.2",
44
- "webpack-code-inspector-plugin": "0.8.1-beta.2"
42
+ "vite-code-inspector-plugin": "0.8.1",
43
+ "code-inspector-core": "0.8.1",
44
+ "webpack-code-inspector-plugin": "0.8.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/node": "^16.0.1",
package/types/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- import { CodeOptions } from 'code-inspector-core';
2
- export interface CodeInspectorPluginOptions extends CodeOptions {
3
- /**
4
- * @zh 指定项目的打包器
5
- * @en specify the bundler of the project
6
- */
7
- bundler: 'vite' | 'webpack' | 'rspack';
8
- /**
9
- * @zh 设置为 true 时,仅当 .env.local 文件存在且其包含 CODE_INSPECTOR=true 时插件生效;默认值为 false
10
- * @en When set the value to true, only if the .env.local file exists and it contains CODE_INSPECTOR=true, the plugin takes effect; The default value is false
11
- */
12
- needEnvInspector?: boolean;
13
- }
14
- export declare function CodeInspectorPlugin(options: CodeInspectorPluginOptions): any;
15
- export declare const codeInspectorPlugin: typeof CodeInspectorPlugin;
1
+ import { CodeOptions } from 'code-inspector-core';
2
+ export interface CodeInspectorPluginOptions extends CodeOptions {
3
+ /**
4
+ * @zh 指定项目的打包器
5
+ * @en specify the bundler of the project
6
+ */
7
+ bundler: 'vite' | 'webpack' | 'rspack';
8
+ /**
9
+ * @zh 设置为 true 时,仅当 .env.local 文件存在且其包含 CODE_INSPECTOR=true 时插件生效;默认值为 false
10
+ * @en When set the value to true, only if the .env.local file exists and it contains CODE_INSPECTOR=true, the plugin takes effect; The default value is false
11
+ */
12
+ needEnvInspector?: boolean;
13
+ }
14
+ export declare function CodeInspectorPlugin(options: CodeInspectorPluginOptions): any;
15
+ export declare const codeInspectorPlugin: typeof CodeInspectorPlugin;