Skip to content

Commit 0019c2e

Browse files
committed
fix: bug of creating assets.py
1 parent f1b7d9e commit 0019c2e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/commands/setup/create.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def create_value_map(filepath:str):
1212
variable_file_content_map = {}
1313
files = os.listdir(filepath)
1414
for file in files:
15-
if file in ["create.py", "setup.ts", "assets.ts"]:
15+
if file in ["create.py", "setup.ts", "assets.ts", ".gitignore"]:
1616
continue
1717
curr_file = os.path.join(filepath, file)
1818
if os.path.isfile(curr_file):
@@ -36,7 +36,9 @@ def main():
3636
value_map = create_value_map(dirname)
3737
file_print("export let fs = {")
3838
for key, value in value_map.items():
39-
file_print(f'\t"{key}": atob("{value}"),')
39+
filename = key.replace(dirname + '/', '')
40+
print(f"Processing file: {filename}")
41+
file_print(f'\t"{filename}": atob("{value}"),')
4042
file_print("};")
4143
print("Generated assets.ts successfully.")
4244

0 commit comments

Comments
 (0)