WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2025-03-19 ad4928108a77fa11f37ff0088a2c53a338d1c526
增加 cursor rules 工具,创建系统链接
1 files added
29 ■■■■■ changed files
_cursor.ai/link-rules.cmd 29 ●●●●● patch | view | raw | blame | history
_cursor.ai/link-rules.cmd
New file
@@ -0,0 +1,29 @@
@echo off
set BASE_DIR=%~dp0..\..\..\
cd %BASE_DIR% || (
    echo Failed to change directory. Please verify if the path is correct.
    goto :end
)
if not exist "src\components\_cursor.ai\rules" (
    echo Source directory does not exist: src\components\_cursor.ai\rules
    goto :end
)
if exist ".cursor\rules" (
    echo Target directory already exists: .cursor\rules
    choice /c YN /m "Delete existing directory and recreate the link? (Y/N)"
    if errorlevel 2 goto :end
    rmdir ".cursor\rules"
)
mklink /j ".cursor\rules" "src\components\_cursor.ai\rules"
if %errorlevel% equ 0 (
    echo Link created successfully!
) else (
    echo Failed to create link. Please check if you have administrator privileges.
)
:end
pause