vite-plugin-generoutes 1.1.0 → 1.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/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  A Vite plugin that automatically generates Vue router configuration based on file system.
4
4
 
5
+ ### 📋 Prerequisites
6
+
7
+ - **Node.js**: `20.12.0` or higher
8
+
5
9
  ### ✨ Features
6
10
 
7
11
  - 📁 File-system based routing
package/README.zh_CN.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  一个基于文件系统自动生成Vue路由配置的Vite插件。
4
4
 
5
+ ### 📋 前置要求
6
+
7
+ - **Node.js**: `20.12.0` 或更高版本
8
+
5
9
  ### ✨ 特性
6
10
 
7
11
  - 📁 基于文件系统的路由生成
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  // src/index.ts
2
2
  import path from "path";
3
+ import { styleText } from "util";
3
4
  import { debounce, slash } from "@antfu/utils";
4
5
  import { parse } from "@vue/compiler-sfc";
5
- import chalk from "chalk";
6
6
  import fs from "fs-extra";
7
7
  import { globSync } from "glob";
8
8
  import prettier from "prettier";
@@ -153,7 +153,7 @@ export type GeneratedRoute = RouteRecordRaw & {
153
153
  const filePath = path.resolve(rootDir, routesPath);
154
154
  await fs.ensureDir(path.dirname(filePath));
155
155
  fs.writeFileSync(filePath, routesStr);
156
- console.log(` \u2705 ${isInit ? "routes generated:" : "routes updated:"} ${chalk.cyan(routesPath)}`);
156
+ console.log(` \u2705 ${isInit ? "routes generated:" : "routes updated:"} ${styleText("cyanBright", routesPath)}`);
157
157
  }
158
158
  const debounceWriter = debounce(500, writerRoutesFile);
159
159
  return {
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "vite-plugin-generoutes",
3
3
  "type": "module",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
+ "packageManager": "pnpm@10.27.0",
5
6
  "description": "A Vite plugin that generate routes based on the file structure, supports dynamic routes, and supports custom meta data for each route.",
6
7
  "author": "Ronnie Zhang <zclzone@outlook.com>",
7
8
  "license": "MIT",
@@ -33,6 +34,17 @@
33
34
  "files": [
34
35
  "dist"
35
36
  ],
37
+ "scripts": {
38
+ "start": "tsup --watch",
39
+ "build": "tsup",
40
+ "lint": "eslint .",
41
+ "prepublishOnly": "nr build",
42
+ "release": "bumpp && npm publish",
43
+ "test": "vitest",
44
+ "typecheck": "tsc --noEmit",
45
+ "prepare": "simple-git-hooks",
46
+ "up:deps": "taze major -I"
47
+ },
36
48
  "peerDependencies": {
37
49
  "vite": ">=6.1.0",
38
50
  "vue-router": ">=4.0.0"
@@ -40,7 +52,6 @@
40
52
  "dependencies": {
41
53
  "@antfu/utils": "^9.3.0",
42
54
  "@vue/compiler-sfc": "^3.5.26",
43
- "chalk": "^5.6.2",
44
55
  "fs-extra": "^11.3.3",
45
56
  "glob": "^13.0.0",
46
57
  "prettier": "^3.7.4"
@@ -68,14 +79,5 @@
68
79
  },
69
80
  "lint-staged": {
70
81
  "*": "eslint --fix"
71
- },
72
- "scripts": {
73
- "start": "tsup --watch",
74
- "build": "tsup",
75
- "lint": "eslint .",
76
- "release": "bumpp && npm publish",
77
- "test": "vitest",
78
- "typecheck": "tsc --noEmit",
79
- "up:deps": "taze major -I"
80
82
  }
81
- }
83
+ }