@tanstack/router-generator
Advanced tools
Comparing version 1.47.0 to 1.48.2
@@ -48,2 +48,25 @@ import path from "node:path"; | ||
} | ||
if (configDirectory) { | ||
if (path.isAbsolute(configDirectory)) { | ||
config.routesDirectory = path.resolve( | ||
configDirectory, | ||
config.routesDirectory | ||
); | ||
config.generatedRouteTree = path.resolve( | ||
configDirectory, | ||
config.generatedRouteTree | ||
); | ||
} else { | ||
config.routesDirectory = path.resolve( | ||
process.cwd(), | ||
configDirectory, | ||
config.routesDirectory | ||
); | ||
config.generatedRouteTree = path.resolve( | ||
process.cwd(), | ||
configDirectory, | ||
config.generatedRouteTree | ||
); | ||
} | ||
} | ||
return config; | ||
@@ -50,0 +73,0 @@ } |
{ | ||
"name": "@tanstack/router-generator", | ||
"version": "1.47.0", | ||
"version": "1.48.2", | ||
"description": "Modern and scalable routing for React applications", | ||
@@ -5,0 +5,0 @@ "author": "Tanner Linsley", |
@@ -68,3 +68,29 @@ import path from 'node:path' | ||
// if a configDirectory is used, paths should be relative to that directory | ||
if (configDirectory) { | ||
// if absolute configDirectory is provided, use it as the root | ||
if (path.isAbsolute(configDirectory)) { | ||
config.routesDirectory = path.resolve( | ||
configDirectory, | ||
config.routesDirectory, | ||
) | ||
config.generatedRouteTree = path.resolve( | ||
configDirectory, | ||
config.generatedRouteTree, | ||
) | ||
} else { | ||
config.routesDirectory = path.resolve( | ||
process.cwd(), | ||
configDirectory, | ||
config.routesDirectory, | ||
) | ||
config.generatedRouteTree = path.resolve( | ||
process.cwd(), | ||
configDirectory, | ||
config.generatedRouteTree, | ||
) | ||
} | ||
} | ||
return config | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
194260
2489