Add js to web extensions

This commit is contained in:
Rhys Yang
2023-10-18 04:47:46 +08:00
parent dfc8f7ddd5
commit 368be01cdc
+6 -4
View File
@@ -10,8 +10,10 @@ comfy_path = os.path.dirname(folder_paths.__file__)
tk_nodes_path = os.path.join(os.path.dirname(__file__))
js_dest_path = os.path.join(comfy_path, "web", "extensions", "SDPromptReader")
if not os.path.exists(js_dest_path):
os.makedirs(js_dest_path)
os.makedirs(js_dest_path, exist_ok=True)
js_src_path = os.path.join(tk_nodes_path, "js", "promptDisplay.js")
shutil.copy(js_src_path, js_dest_path)
files_to_copy = ["promptDisplay.js", "parameterDisplay.js", "seedGen.js"]
for file in files_to_copy:
js_src_path = os.path.join(tk_nodes_path, "js", file)
shutil.copy(js_src_path, js_dest_path)