Skip to content

Commit

Permalink
Update piggymap devtool
Browse files Browse the repository at this point in the history
  • Loading branch information
sondregronas committed Aug 27, 2024
1 parent 72378db commit 8b5a019
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions piggy/piggybank.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,11 @@ def recursive_sort(data):


PIGGYMAP = generate_piggymap(PIGGYBANK_FOLDER)


# DEVTOOL
def __update_piggymap():
global PIGGYMAP
print("Rebuilding piggymap")
PIGGYMAP = generate_piggymap(PIGGYBANK_FOLDER)
print("Piggymap rebuilt")
4 changes: 4 additions & 0 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def checkout_branch(branch):

if __name__ == "__main__":
from piggy.devtools import inject_devtools
from piggy.piggybank import __update_piggymap

# TODO: Re-enable
checkout_branch("test-output")
os.environ["FLASK_DEBUG"] = "1"
Expand All @@ -35,6 +37,8 @@ def checkout_branch(branch):
run_tailwind(reload=True)
subprocess.Popen('npx livereload "piggy/, piggybank/"', shell=True)

__update_piggymap()

app.run(port=5001)
else:
# TODO: Re-enable
Expand Down

0 comments on commit 8b5a019

Please sign in to comment.