mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-25 12:52:47 -07:00
feat: link route-generator to vite-fs-router
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"packageManager": "pnpm@8.12.1",
|
"packageManager": "pnpm@8.12.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "turbo build",
|
||||||
"lint": "turbo lint",
|
"lint": "turbo lint",
|
||||||
"format": "turbo format",
|
"format": "turbo format",
|
||||||
"test": "turbo test"
|
"test": "turbo test"
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
"@tanstack/config": "^0.7.0",
|
"@tanstack/config": "^0.7.0",
|
||||||
"@types/babel__core": "^7.20.5",
|
"@types/babel__core": "^7.20.5",
|
||||||
"@vitejs/plugin-react": "^4.2.1",
|
"@vitejs/plugin-react": "^4.2.1",
|
||||||
|
"router-generator": "workspace:*",
|
||||||
"vite": "^5.2.10",
|
"vite": "^5.2.10",
|
||||||
"vitest": "^1.5.2"
|
"vitest": "^1.5.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { fileURLToPath, pathToFileURL } from 'url'
|
import { fileURLToPath, pathToFileURL } from 'url'
|
||||||
|
import { routeGenerator } from 'router-generator'
|
||||||
|
|
||||||
import { normalize } from 'path'
|
import { normalize } from 'path'
|
||||||
// eslint-disable-next-line sort-imports
|
// eslint-disable-next-line sort-imports
|
||||||
@@ -19,8 +20,8 @@ export function RouterGenerator(): Plugin {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// TODO: generator function
|
// TODO: generator function
|
||||||
// This generator function is from the router-generator package
|
|
||||||
console.log('Generating [generate fn]')
|
console.log('Generating [generate fn]')
|
||||||
|
await routeGenerator()
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
+4
-1
@@ -3,6 +3,9 @@
|
|||||||
"pipeline": {
|
"pipeline": {
|
||||||
"lint": {},
|
"lint": {},
|
||||||
"format": {},
|
"format": {},
|
||||||
"test": {}
|
"test": {},
|
||||||
|
"build": {
|
||||||
|
"outputs": ["dist/**"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user