code-inspector-plugin 0.1.0 → 0.1.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.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vite-code-inspector-plugin");function u(e){if(!(e!=null&&e.bundler)){console.error("Please specify the bundler in the options of CodeInspectorPlugin.");return}if(e.bundler==="webpack"){const r=require("webpack-code-inspector-plugin");return new r(e)}else return n.ViteCodeInspectorPlugin(e)}exports.CodeInspectorPlugin=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vite-code-inspector-plugin"),u=require("chalk");function c(e){if(!(e!=null&&e.bundler)){console.log(u.red("Please specify the bundler in the options of code-inspector-plugin."));return}if(e.bundler==="webpack"){const r=require("webpack-code-inspector-plugin");return new r(e)}else return n.ViteCodeInspectorPlugin(e)}exports.CodeInspectorPlugin=c;
package/dist/index.mjs CHANGED
@@ -1,8 +1,11 @@
1
1
  import { ViteCodeInspectorPlugin as n } from "vite-code-inspector-plugin";
2
- function c(e) {
2
+ import c from "chalk";
3
+ function t(e) {
3
4
  if (!(e != null && e.bundler)) {
4
- console.error(
5
- "Please specify the bundler in the options of CodeInspectorPlugin."
5
+ console.log(
6
+ c.red(
7
+ "Please specify the bundler in the options of code-inspector-plugin."
8
+ )
6
9
  );
7
10
  return;
8
11
  }
@@ -13,5 +16,5 @@ function c(e) {
13
16
  return n(e);
14
17
  }
15
18
  export {
16
- c as CodeInspectorPlugin
19
+ t as CodeInspectorPlugin
17
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-inspector-plugin",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "typings": "./types/index.d.ts",
@@ -38,9 +38,10 @@
38
38
  "url": "https://github.com/zh-lx/code-inspector/issues"
39
39
  },
40
40
  "dependencies": {
41
- "vite-code-inspector-plugin": "0.1.0",
42
- "code-inspector-core": "0.1.0",
43
- "webpack-code-inspector-plugin": "0.1.0"
41
+ "chalk": "4.1.1",
42
+ "code-inspector-core": "0.1.1",
43
+ "webpack-code-inspector-plugin": "0.1.1",
44
+ "vite-code-inspector-plugin": "0.1.1"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@types/node": "^16.0.1",
package/types/index.d.ts CHANGED
@@ -1,15 +1,6 @@
1
- import type WebpackCodeInspectorPlugin from 'webpack-code-inspector-plugin/types/index';
2
- import { ViteCodeInspectorPlugin } from 'vite-code-inspector-plugin';
3
1
  import { CodeOptions } from 'code-inspector-core';
4
2
  export interface CodeInspectorPluginOptions extends CodeOptions {
5
- framework?: 'vue';
6
3
  bundler: 'vite' | 'webpack';
4
+ catch?: boolean;
7
5
  }
8
- export interface CodeInspectorPluginVite extends CodeInspectorPluginOptions {
9
- bundler: 'vite';
10
- }
11
- export interface CodeInspectorPluginWebpack extends CodeInspectorPluginOptions {
12
- bundler: 'webpack';
13
- }
14
- export declare function CodeInspectorPlugin(options: CodeInspectorPluginVite): ReturnType<typeof ViteCodeInspectorPlugin>;
15
- export declare function CodeInspectorPlugin(options: CodeInspectorPluginWebpack): WebpackCodeInspectorPlugin;
6
+ export declare function CodeInspectorPlugin(options: CodeInspectorPluginOptions): any;