@@ -64,6 +64,10 @@ def setup_project_structure():
6464 shutil .rmtree ("react-extension-template" )
6565 print ("✓ Removed react-extension-template directory" )
6666
67+ if Pth ("vue-basic-template" ).exists ():
68+ shutil .rmtree ("vue-basic-template" )
69+ print ("✓ Removed vue-basic-template directory" )
70+
6771 elif frontend_type == "react" :
6872 if Pth ("react-extension-template" ).exists ():
6973 print ("✓ Found react-extension-template directory" )
@@ -102,14 +106,47 @@ def setup_project_structure():
102106 shutil .rmtree ("custom-nodes-template" )
103107 print ("✓ Removed custom-nodes-template directory" )
104108
109+ elif frontend_type == "vue" :
110+ if Pth ("vue-basic-template" ).exists ():
111+ print ("✓ Found vue-basic-template directory" )
112+ for item in Pth ("vue-basic-template" ).iterdir ():
113+ # Skip git-related files when copying from react template
114+ if item .name in [".git" , ".gitmodules" , ".gitignore" ]:
115+ continue
116+
117+ target = Pth (item .name )
118+ if item .is_file ():
119+ shutil .copy2 (item , target )
120+ print (f"✓ Copied file: { item } -> { target } " )
121+ else :
122+ if target .exists ():
123+ shutil .rmtree (target )
124+ shutil .copytree (item , target , ignore = shutil .ignore_patterns ('.git' , '.gitmodules' , ".gitignore" ))
125+ print (f"✓ Copied directory: { item } -> { target } " )
126+
127+ files_to_replace = [
128+ "README.md" ,
129+ ]
130+
131+ replacements = {
132+ "ComfyUI Frontend Vue Basic" : "{{cookiecutter.project_name}}" ,
133+ "MIT License" : "{{cookiecutter.open_source_license}}" ,
134+ }
135+
136+ replace_text_in_files (files_to_replace , replacements )
137+
138+ if Pth ("custom-nodes-template" ).exists ():
139+ shutil .rmtree ("custom-nodes-template" )
140+ print ("✓ Removed custom-nodes-template directory" )
141+
105142 if Pth ("common" ).exists ():
106143 print ("✓ Found common directory" )
107144 for item in Pth ("common" ).iterdir ():
108145 if item .is_file ():
109146 shutil .copy2 (item , "." )
110147 print (f"✓ Copied common file: { item } " )
111148
112- for template_dir in ["common" , "custom-nodes-template" , "react-extension-template" ]:
149+ for template_dir in ["common" , "custom-nodes-template" , "react-extension-template" , "vue-basic-template" ]:
113150 if Pth (template_dir ).exists ():
114151 shutil .rmtree (template_dir )
115152 print (f"✓ Cleaned up: { template_dir } " )
0 commit comments