WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2025-03-25 2cdef278aaf648604f84350045dc859b98e01d3f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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