annotate tasks.py @ 19:23fa6402c728

more merge i think
author drewp@bigasterisk.com
date Thu, 12 Dec 2019 23:07:06 -0800
parents 4bf74032e2e8
children 09080dc809ed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
drewp@localhost
parents:
diff changeset
1 from invoke import task # pytype: disable=import-error
drewp@localhost
parents:
diff changeset
2
drewp@localhost
parents:
diff changeset
3
drewp@localhost
parents:
diff changeset
4 @task
drewp@localhost
parents:
diff changeset
5 def setup_npm(ctx):
17
94629c39681c trying to do ts+jest. WIP
drewp@bigasterisk.com
parents: 9
diff changeset
6 ctx.run('yarn install')
0
drewp@localhost
parents:
diff changeset
7
drewp@localhost
parents:
diff changeset
8 @task
drewp@localhost
parents:
diff changeset
9 def serve_demo(ctx):
17
94629c39681c trying to do ts+jest. WIP
drewp@bigasterisk.com
parents: 9
diff changeset
10 ctx.run('yarn webpack-dev-server --config webpack-dev.config.ts --port 8082')
0
drewp@localhost
parents:
diff changeset
11
drewp@localhost
parents:
diff changeset
12 @task
drewp@localhost
parents:
diff changeset
13 def build(ctx):
17
94629c39681c trying to do ts+jest. WIP
drewp@bigasterisk.com
parents: 9
diff changeset
14 ctx.run(f'yarn run webpack-cli --config webpack.config.js --mode production')
0
drewp@localhost
parents:
diff changeset
15 ctx.run(f'cp build/streamed-graph.bundle.js /my/site/homepage/www/rdf/streamed-graph.bundle.js')
drewp@localhost
parents:
diff changeset
16 ctx.run(f'cp streamed-graph.css /my/site/homepage/www/rdf/streamed-graph.css')
9
26d3e4860adc working on porting graph_view to n3.js. also working on making tests run
drewp@bigasterisk.com
parents: 0
diff changeset
17
26d3e4860adc working on porting graph_view to n3.js. also working on making tests run
drewp@bigasterisk.com
parents: 0
diff changeset
18 @task
26d3e4860adc working on porting graph_view to n3.js. also working on making tests run
drewp@bigasterisk.com
parents: 0
diff changeset
19 def test(ctx):
15
7ca4ff2088c3 managed to use a newer ts or something, so this includes a bunch of type fixes too
drewp@bigasterisk.com
parents: 9
diff changeset
20 ctx.run(f'node_modules/.bin/webpack-cli --config webpack-test.config.ts')
17
94629c39681c trying to do ts+jest. WIP
drewp@bigasterisk.com
parents: 9
diff changeset
21 ctx.run(f'node_modules/.bin/ts-node node_modules/.bin/jasmine --config=jasmine.json')
94629c39681c trying to do ts+jest. WIP
drewp@bigasterisk.com
parents: 9
diff changeset
22
94629c39681c trying to do ts+jest. WIP
drewp@bigasterisk.com
parents: 9
diff changeset
23 # one time:
94629c39681c trying to do ts+jest. WIP
drewp@bigasterisk.com
parents: 9
diff changeset
24 # yarn policies set-version v2
94629c39681c trying to do ts+jest. WIP
drewp@bigasterisk.com
parents: 9
diff changeset
25 # in vscode, ctrl-p then: ext install ark120202.vscode-typescript-pnp-plugin
94629c39681c trying to do ts+jest. WIP
drewp@bigasterisk.com
parents: 9
diff changeset
26 # or see https://next.yarnpkg.com/advanced/pnpify for a compatibility runner.