Skip to content

Commit

Permalink
change folder name
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekmmgn committed Apr 19, 2024
1 parent 6d6b7a0 commit df768a1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 230 deletions.
195 changes: 0 additions & 195 deletions public/index.css

This file was deleted.

13 changes: 0 additions & 13 deletions public/index.html

This file was deleted.

13 changes: 0 additions & 13 deletions public/installation-guide/index.html

This file was deleted.

4 changes: 2 additions & 2 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def run(
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="HTTP Server with CORS")
parser.add_argument(
"--dir", type=str, help="Directory to serve files from", default="public"
"--dir", type=str, help="Directory to serve files from", default="dist"
)
parser.add_argument("--port", type=int,
help="Port to serve HTTP on", default=8888)
help="Port to serve HTTP on", default=1234)
args = parser.parse_args()

run(port=args.port, directory=args.dir)
14 changes: 7 additions & 7 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
from page_generation import generate_pages_recursive

dir_path_static = "./static"
dir_path_public = "./public"
dir_path_dist = "./dist"


def main():
print("Deleting public directory...")
if os.path.exists(dir_path_public):
shutil.rmtree(dir_path_public)
print("Deleting dist directory...")
if os.path.exists(dir_path_dist):
shutil.rmtree(dir_path_dist)

print("Copying static files to public directory...")
copy_files_recursive(dir_path_static, dir_path_public)
print("Copying static files to dist directory...")
copy_files_recursive(dir_path_static, dir_path_dist)

generate_pages_recursive("./content", "./template.html", dir_path_public)
generate_pages_recursive("./content", "./template.html", dir_path_dist)


main()

0 comments on commit df768a1

Please sign in to comment.