@lntvow/vite-plugin 0.0.6 → 0.0.7

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.cjs CHANGED
@@ -16,14 +16,11 @@ const timezone__default = /*#__PURE__*/_interopDefaultCompat(timezone);
16
16
 
17
17
  dayjs__default.extend(utc__default);
18
18
  dayjs__default.extend(timezone__default);
19
- function vitePluginLogs(options = {}) {
19
+ function vitePluginLogs(options) {
20
20
  const { name = "LNTVOW_VERSION" } = options;
21
21
  let version = options.version;
22
22
  if (!version) {
23
- const packageJsonContent = fs__default.readFileSync(
24
- path__default.resolve(process.cwd(), "package.json"),
25
- "utf8"
26
- );
23
+ const packageJsonContent = fs__default.readFileSync(path__default.resolve(process.cwd(), "package.json"), "utf8");
27
24
  if (!packageJsonContent)
28
25
  throw new Error("package.json not found");
29
26
  version = JSON.parse(packageJsonContent).version;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Plugin } from 'vite';
2
2
 
3
- declare function vitePluginLogs(options?: Options): Plugin;
3
+ declare function vitePluginLogs(options: Options): Plugin;
4
4
  interface Options {
5
5
  /**
6
6
  * @description localStorage key
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Plugin } from 'vite';
2
2
 
3
- declare function vitePluginLogs(options?: Options): Plugin;
3
+ declare function vitePluginLogs(options: Options): Plugin;
4
4
  interface Options {
5
5
  /**
6
6
  * @description localStorage key
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Plugin } from 'vite';
2
2
 
3
- declare function vitePluginLogs(options?: Options): Plugin;
3
+ declare function vitePluginLogs(options: Options): Plugin;
4
4
  interface Options {
5
5
  /**
6
6
  * @description localStorage key
package/dist/index.mjs CHANGED
@@ -6,14 +6,11 @@ import timezone from 'dayjs/plugin/timezone.js';
6
6
 
7
7
  dayjs.extend(utc);
8
8
  dayjs.extend(timezone);
9
- function vitePluginLogs(options = {}) {
9
+ function vitePluginLogs(options) {
10
10
  const { name = "LNTVOW_VERSION" } = options;
11
11
  let version = options.version;
12
12
  if (!version) {
13
- const packageJsonContent = fs.readFileSync(
14
- path.resolve(process.cwd(), "package.json"),
15
- "utf8"
16
- );
13
+ const packageJsonContent = fs.readFileSync(path.resolve(process.cwd(), "package.json"), "utf8");
17
14
  if (!packageJsonContent)
18
15
  throw new Error("package.json not found");
19
16
  version = JSON.parse(packageJsonContent).version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lntvow/vite-plugin",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "vite插件",
5
5
  "type": "module",
6
6
  "license": "MIT",