Closed Skiyee closed 5 months ago
The changes introduce a new utility function isCLIMode
in src/utils.ts
to determine if a path includes 'src/'. This function is then utilized in loadPagesJson
and getTarget
functions for path resolution, enhancing the accuracy of path checks and error messages.
File | Change Summary |
---|---|
src/utils.ts |
Introduced isCLIMode function, updated loadPagesJson to use isCLIMode for path checks, and modified getTarget to utilize isCLIMode for path resolution. |
Objective | Addressed | Explanation |
---|---|---|
Ensure path resolution accommodates CLI mode (#36) | ✅ | |
Update error message for missing pages.json (#36) |
✅ |
In the code, a change so bright, Paths now check if CLI's in sight. With
isCLIMode
to guide the way, Errors clearer, no more dismay. A rabbit's touch, to make it right. 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
没测试 windows 环境 不好意思
没测试 windows 环境 不好意思
没问题的 ❤
是我们 reviewer
没做测试,算是我们的问题
俺没有 windows😢
Thank you!
俺没有 windows😢
那有可能就我是window,尴尬了这下
isCLIMode
俺没有 windows😢
我也没有 😂
@ModyQyW 这次你草率了 发版太快了
loadPagesJson 在 context.ts 里的入参是 src/pages.json,isCLIMode 始终是 true
loadPagesJson 在 context.ts 里的入参是 src/pages.json,isCLIMode 始终是 true
hx 创建得项目是不是得修改layoutDir这个属性?
loadPagesJson 在 context.ts 里的入参是 src/pages.json,isCLIMode 始终是 true
hx 创建得项目是不是得修改layoutDir这个属性?
跟 layoutDir 没关系 是解析不到 pages.json 文件
跟 layoutDir 没关系 是解析不到 pages.json 文件
我知道问题,我要通过layoutDir来判断什么模式创建的项目
跟 layoutDir 没关系 是解析不到 pages.json 文件
我知道问题,我要通过layoutDir来判断什么模式创建的项目
这个也不严谨,因为 layoutDir 是用户自己可以指定的任意目录
fixes: #36
Summary by CodeRabbit
New Features
Bug Fixes
pages.json
file, providing clearer guidance for resolving issues.