fix: copy favicon and neuron dhall properly
This commit is contained in:
parent
cf350d9e99
commit
995b76d938
1 changed files with 10 additions and 16 deletions
|
@ -11,29 +11,23 @@ def transfer_files(target_dir, source_dir):
|
||||||
shutil.copytree(
|
shutil.copytree(
|
||||||
f"{source_dir}/.neuron-generator/templates", target_dir, dirs_exist_ok=True
|
f"{source_dir}/.neuron-generator/templates", target_dir, dirs_exist_ok=True
|
||||||
)
|
)
|
||||||
neuron_template = open(f"{target_dir}/neuron.dhall", "x")
|
|
||||||
neuron_template.close()
|
|
||||||
print(colored("SUCCESS Templates transferred", "light_green"))
|
|
||||||
|
|
||||||
# Copy favicon
|
shutil.copy2(
|
||||||
shutil.copytree(
|
f"{source_dir}/.neuron-generator/neuron.dhall",
|
||||||
f"{source_dir}/.neuron-generator/templates/favicon",
|
f"{target_dir}",
|
||||||
f"{target_dir}/static",
|
|
||||||
dirs_exist_ok=True,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
print(colored("SUCCESS Templates transferred", "light_green"))
|
||||||
|
|
||||||
# Copy images to /static
|
# Copy images to /static
|
||||||
print(colored("INFO Copying static files...", "light_blue"))
|
print(colored("INFO Copying static files...", "light_blue"))
|
||||||
shutil.copytree(f"{source_dir}/img", f"{target_dir}/static", dirs_exist_ok=True)
|
shutil.copytree(f"{source_dir}/img", f"{target_dir}/static", dirs_exist_ok=True)
|
||||||
print(colored("SUCCESS Static files transferred", "light_green"))
|
shutil.copy2(
|
||||||
|
f"{source_dir}/.neuron-generator/templates/favicon/favicon.ico",
|
||||||
|
f"{target_dir}/static",
|
||||||
|
)
|
||||||
|
|
||||||
# Copy favicon
|
print(colored("SUCCESS Static files transferred", "light_green"))
|
||||||
[
|
|
||||||
shutil.copy2(f, f"{target_dir}/static")
|
|
||||||
for f in glob.glob(
|
|
||||||
f"{source_dir}/.neuron-generator/templates/favicon/favicon*"
|
|
||||||
)
|
|
||||||
]
|
|
||||||
|
|
||||||
print(colored("INFO Copying zettels...", "light_blue"))
|
print(colored("INFO Copying zettels...", "light_blue"))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue