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(
|
||||
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.copytree(
|
||||
f"{source_dir}/.neuron-generator/templates/favicon",
|
||||
f"{target_dir}/static",
|
||||
dirs_exist_ok=True,
|
||||
shutil.copy2(
|
||||
f"{source_dir}/.neuron-generator/neuron.dhall",
|
||||
f"{target_dir}",
|
||||
)
|
||||
|
||||
print(colored("SUCCESS Templates transferred", "light_green"))
|
||||
|
||||
# Copy images to /static
|
||||
print(colored("INFO Copying static files...", "light_blue"))
|
||||
shutil.copytree(f"{source_dir}/img", f"{target_dir}/static", dirs_exist_ok=True)
|
||||
print(colored("SUCCESS Static files transferred", "light_green"))
|
||||
|
||||
# Copy favicon
|
||||
[
|
||||
shutil.copy2(f, f"{target_dir}/static")
|
||||
for f in glob.glob(
|
||||
f"{source_dir}/.neuron-generator/templates/favicon/favicon*"
|
||||
shutil.copy2(
|
||||
f"{source_dir}/.neuron-generator/templates/favicon/favicon.ico",
|
||||
f"{target_dir}/static",
|
||||
)
|
||||
]
|
||||
|
||||
print(colored("SUCCESS Static files transferred", "light_green"))
|
||||
|
||||
print(colored("INFO Copying zettels...", "light_blue"))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue