Mercurial > code > home > repos > streamed-graph
annotate tasks.py @ 29:45ed53428e74
fix configs to run tests (all in one bundle though)
author | drewp@bigasterisk.com |
---|---|
date | Sun, 15 Dec 2019 21:18:42 -0800 |
parents | 86270a59ae7b |
children | e54941d93356 |
rev | line source |
---|---|
0 | 1 from invoke import task # pytype: disable=import-error |
2 | |
3 | |
4 @task | |
5 def setup_npm(ctx): | |
17 | 6 ctx.run('yarn install') |
0 | 7 |
8 @task | |
9 def serve_demo(ctx): | |
29
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
10 ctx.run('yarn webpack-dev-server') |
0 | 11 |
12 @task | |
13 def build(ctx): | |
29
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
14 ctx.run(f'yarn run webpack-build') # --debug --display-error-details |
0 | 15 ctx.run(f'cp build/streamed-graph.bundle.js /my/site/homepage/www/rdf/streamed-graph.bundle.js') |
29
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
16 ctx.run(f'cp src/streamed-graph.css /my/site/homepage/www/rdf/streamed-graph.css') |
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
17 |
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
18 @task |
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
19 def build_forever(ctx): |
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
20 ctx.run(f'yarn run webpack-build-forever') |
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
21 |
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
22 @task |
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
23 def dev_server(ctx): |
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
24 ctx.run(f'yarn webpack-dev-server') |
9
26d3e4860adc
working on porting graph_view to n3.js. also working on making tests run
drewp@bigasterisk.com
parents:
0
diff
changeset
|
25 |
26d3e4860adc
working on porting graph_view to n3.js. also working on making tests run
drewp@bigasterisk.com
parents:
0
diff
changeset
|
26 @task |
26d3e4860adc
working on porting graph_view to n3.js. also working on making tests run
drewp@bigasterisk.com
parents:
0
diff
changeset
|
27 def test(ctx): |
29
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
28 ctx.run(f'yarn test', pty=True) |
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
29 |
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
30 @task |
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
31 def test_forever(ctx): |
45ed53428e74
fix configs to run tests (all in one bundle though)
drewp@bigasterisk.com
parents:
25
diff
changeset
|
32 ctx.run(f'yarn test-forever', pty=True) |
17 | 33 |
25
86270a59ae7b
even better configs. ts maps, devserver mode.
drewp@bigasterisk.com
parents:
24
diff
changeset
|
34 # one time per machine: |
17 | 35 # yarn policies set-version v2 |
36 # in vscode, ctrl-p then: ext install ark120202.vscode-typescript-pnp-plugin | |
37 # or see https://next.yarnpkg.com/advanced/pnpify for a compatibility runner. |