annotate tasks.py @ 32:db0e9cbf52e5

WIP converting to the package system that i found can work
author drewp@bigasterisk.com
date Tue, 24 Dec 2019 18:37:03 -0800
parents 86270a59ae7b
children
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):
32
db0e9cbf52e5 WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents: 25
diff changeset
6 ctx.run('npm install')
db0e9cbf52e5 WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents: 25
diff changeset
7
0
drewp@localhost
parents:
diff changeset
8
drewp@localhost
parents:
diff changeset
9 @task
drewp@localhost
parents:
diff changeset
10 def serve_demo(ctx):
32
db0e9cbf52e5 WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents: 25
diff changeset
11 ctx.run('npm run webpack-dev-server')
db0e9cbf52e5 WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents: 25
diff changeset
12
0
drewp@localhost
parents:
diff changeset
13
drewp@localhost
parents:
diff changeset
14 @task
drewp@localhost
parents:
diff changeset
15 def build(ctx):
32
db0e9cbf52e5 WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents: 25
diff changeset
16 ctx.run(f'npm run webpack-build')
db0e9cbf52e5 WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents: 25
diff changeset
17 ctx.run(f'cp build/bundle.js /my/site/homepage/www/rdf/streamed-graph.bundle.js')
0
drewp@localhost
parents:
diff changeset
18 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
19
32
db0e9cbf52e5 WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents: 25
diff changeset
20
9
26d3e4860adc working on porting graph_view to n3.js. also working on making tests run
drewp@bigasterisk.com
parents: 0
diff changeset
21 @task
26d3e4860adc working on porting graph_view to n3.js. also working on making tests run
drewp@bigasterisk.com
parents: 0
diff changeset
22 def test(ctx):
32
db0e9cbf52e5 WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents: 25
diff changeset
23 ctx.run(f'npm test')