vite-plugin-generoutes 1.0.0 → 1.0.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 +4 -6
- package/README.zh_CN.md +4 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,11 +26,10 @@ pnpm add vite-plugin-generoutes -D
|
|
|
26
26
|
|
|
27
27
|
### 🔨 Usage
|
|
28
28
|
|
|
29
|
-
Configure the plugin in your `vite.config.
|
|
29
|
+
Configure the plugin in your `vite.config.js`:
|
|
30
30
|
|
|
31
|
-
```
|
|
31
|
+
```javascript
|
|
32
32
|
import vue from '@vitejs/plugin-vue'
|
|
33
|
-
// vite.config.ts
|
|
34
33
|
import { defineConfig } from 'vite'
|
|
35
34
|
import generoutes from 'vite-plugin-generoutes'
|
|
36
35
|
|
|
@@ -110,9 +109,8 @@ defineOptions({
|
|
|
110
109
|
|
|
111
110
|
### 🚀 Complete Example
|
|
112
111
|
|
|
113
|
-
```
|
|
112
|
+
```javascript
|
|
114
113
|
import vue from '@vitejs/plugin-vue'
|
|
115
|
-
// vite.config.ts
|
|
116
114
|
import { defineConfig } from 'vite'
|
|
117
115
|
import generoutes from 'vite-plugin-generoutes'
|
|
118
116
|
|
|
@@ -122,7 +120,7 @@ export default defineConfig({
|
|
|
122
120
|
generoutes({
|
|
123
121
|
pagesFolder: 'src/views',
|
|
124
122
|
ignoreFolders: ['components', 'assets'],
|
|
125
|
-
routesPath: 'src/router/routes.
|
|
123
|
+
routesPath: 'src/router/routes.js',
|
|
126
124
|
nested: true
|
|
127
125
|
})
|
|
128
126
|
]
|
package/README.zh_CN.md
CHANGED
|
@@ -26,11 +26,10 @@ pnpm add vite-plugin-generoutes -D
|
|
|
26
26
|
|
|
27
27
|
### 🔨 使用方法
|
|
28
28
|
|
|
29
|
-
在`vite.config.
|
|
29
|
+
在`vite.config.js`中配置插件:
|
|
30
30
|
|
|
31
|
-
```
|
|
31
|
+
```javascript
|
|
32
32
|
import vue from '@vitejs/plugin-vue'
|
|
33
|
-
// vite.config.ts
|
|
34
33
|
import { defineConfig } from 'vite'
|
|
35
34
|
import generoutes from 'vite-plugin-generoutes'
|
|
36
35
|
|
|
@@ -110,9 +109,8 @@ defineOptions({
|
|
|
110
109
|
|
|
111
110
|
### 🚀 完整示例
|
|
112
111
|
|
|
113
|
-
```
|
|
112
|
+
```javascript
|
|
114
113
|
import vue from '@vitejs/plugin-vue'
|
|
115
|
-
// vite.config.ts
|
|
116
114
|
import { defineConfig } from 'vite'
|
|
117
115
|
import generoutes from 'vite-plugin-generoutes'
|
|
118
116
|
|
|
@@ -122,7 +120,7 @@ export default defineConfig({
|
|
|
122
120
|
generoutes({
|
|
123
121
|
pagesFolder: 'src/views',
|
|
124
122
|
ignoreFolders: ['components', 'assets'],
|
|
125
|
-
routesPath: 'src/router/routes.
|
|
123
|
+
routesPath: 'src/router/routes.js',
|
|
126
124
|
nested: true
|
|
127
125
|
})
|
|
128
126
|
]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-generoutes",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"packageManager": "pnpm@10.6.2",
|
|
6
6
|
"description": "A Vite plugin that generate routes based on the file structure, supports dynamic routes, and supports custom meta data for each route.",
|
|
7
7
|
"author": "Ronnie Zhang <zclzone@outlook.com>",
|