Initial commit

This commit is contained in:
Edward Betts 2023-10-04 12:56:21 +01:00
commit f07b407e7a
25 changed files with 2383 additions and 0 deletions

22
add_front_end_libraries.py Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/python3
import os
import shutil
import subprocess
STATIC_DIR = "static"
assert os.path.exists("package.json") and os.path.exists("node_modules")
if not os.path.exists(STATIC_DIR):
os.mkdir(STATIC_DIR)
shutil.copytree(
"node_modules/bootstrap/dist/",
os.path.join(STATIC_DIR, "bootstrap"),
dirs_exist_ok=True,
)
subprocess.run(["npm", "run", "build"], check=True)
shutil.copy("dist/add_links.es.js", "static")