diff tasks.py @ 126:9a57f8c556d2

add depgraph task
author drewp@bigasterisk.com
date Fri, 05 May 2023 21:22:35 -0700
parents 5e6840229a05
children 73a70d00fb74
line wrap: on
line diff
--- a/tasks.py	Sun Mar 20 16:40:51 2022 -0700
+++ b/tasks.py	Fri May 05 21:22:35 2023 -0700
@@ -1,3 +1,4 @@
+import os
 from invoke import task  # pytype: disable=import-error
 
 
@@ -32,4 +33,9 @@
 
 @task
 def dev(ctx):
-    ctx.run('pnpm dev')
\ No newline at end of file
+    ctx.run('pnpm dev')
+
+@task
+def deps(ctx):
+    ctx.run('node_modules/.bin/depcruise --config .dependency-cruiser.js -T dot src | dot -Tsvg > deps.svg')
+    print(f"browse to file://{os.path.abspath('deps.svg')}")
\ No newline at end of file