Mercurial > code > home > repos > streamed-graph
annotate tasks.py @ 126:9a57f8c556d2
add depgraph task
author | drewp@bigasterisk.com |
---|---|
date | Fri, 05 May 2023 21:22:35 -0700 |
parents | 5e6840229a05 |
children | 73a70d00fb74 |
rev | line source |
---|---|
126 | 1 import os |
0 | 2 from invoke import task # pytype: disable=import-error |
3 | |
4 | |
5 @task | |
60 | 6 def setup_js(ctx): |
92
8db5ba7e12b9
pnpm install is slow & broken over nfs with a mismatching abspath
drewp@bigasterisk.com
parents:
90
diff
changeset
|
7 if 0: # only reasonable on bang,but dash tries to rebuild it |
8db5ba7e12b9
pnpm install is slow & broken over nfs with a mismatching abspath
drewp@bigasterisk.com
parents:
90
diff
changeset
|
8 ctx.run('pnpm install --dir=$PWD') |
0 | 9 |
68
f357cd36c26e
pnpm install is cheap; do it all the time
drewp@bigasterisk.com
parents:
60
diff
changeset
|
10 @task(pre=[setup_js]) |
0 | 11 def serve_demo(ctx): |
35 | 12 ctx.run('webfsd -Fp 8021') |
0 | 13 |
68
f357cd36c26e
pnpm install is cheap; do it all the time
drewp@bigasterisk.com
parents:
60
diff
changeset
|
14 @task(pre=[setup_js]) |
0 | 15 def build(ctx): |
60 | 16 ctx.run(f'pnpm run build', pty=True) |
29
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
17 |
68
f357cd36c26e
pnpm install is cheap; do it all the time
drewp@bigasterisk.com
parents:
60
diff
changeset
|
18 @task(pre=[setup_js]) |
29
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
19 def build_forever(ctx): |
60 | 20 ctx.run(f'pnpm run build_forever', pty=True) |
9
26d3e4860adc
working on porting graph_view to n3.js. also working on making tests run
drewp@bigasterisk.com
parents:
0
diff
changeset
|
21 |
68
f357cd36c26e
pnpm install is cheap; do it all the time
drewp@bigasterisk.com
parents:
60
diff
changeset
|
22 @task(pre=[setup_js]) |
9
26d3e4860adc
working on porting graph_view to n3.js. also working on making tests run
drewp@bigasterisk.com
parents:
0
diff
changeset
|
23 def test(ctx): |
60 | 24 ctx.run(f'pnpm run test', pty=True) |
29
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
25 |
68
f357cd36c26e
pnpm install is cheap; do it all the time
drewp@bigasterisk.com
parents:
60
diff
changeset
|
26 @task(pre=[setup_js]) |
29
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
27 def test_forever(ctx): |
60 | 28 ctx.run(f'pnpm run test_forever', pty=True) |
90 | 29 |
30 @task | |
31 def release(ctx): | |
32 ctx.run(f'pnpm publish --registry https://bigasterisk.com/js', pty=True) | |
108
5e6840229a05
rewrite freeStatements rendering to put more planning in layout
drewp@bigasterisk.com
parents:
92
diff
changeset
|
33 |
5e6840229a05
rewrite freeStatements rendering to put more planning in layout
drewp@bigasterisk.com
parents:
92
diff
changeset
|
34 @task |
5e6840229a05
rewrite freeStatements rendering to put more planning in layout
drewp@bigasterisk.com
parents:
92
diff
changeset
|
35 def dev(ctx): |
126 | 36 ctx.run('pnpm dev') |
37 | |
38 @task | |
39 def deps(ctx): | |
40 ctx.run('node_modules/.bin/depcruise --config .dependency-cruiser.js -T dot src | dot -Tsvg > deps.svg') | |
41 print(f"browse to file://{os.path.abspath('deps.svg')}") |