Mercurial > code > home > repos > streamed-graph
comparison tasks.py @ 33:b82c05e22d9a
change to npm with a build that worked better as a local package to be shared
author | drewp@bigasterisk.com |
---|---|
date | Tue, 24 Dec 2019 20:30:27 -0800 |
parents | e54941d93356 |
children | 29d8ed02a275 |
comparison
equal
deleted
inserted
replaced
31:e54941d93356 | 33:b82c05e22d9a |
---|---|
1 from invoke import task # pytype: disable=import-error | 1 from invoke import task # pytype: disable=import-error |
2 | 2 |
3 | 3 |
4 @task | 4 @task |
5 def setup_npm(ctx): | 5 def setup_npm(ctx): |
6 ctx.run('yarn install') | 6 ctx.run('npm run install') |
7 | 7 |
8 @task | 8 @task |
9 def serve_demo(ctx): | 9 def serve_demo(ctx): |
10 ctx.run('yarn webpack-dev-server') | 10 ctx.run('npm run webpack-dev-server') |
11 | 11 |
12 @task | 12 @task |
13 def build(ctx): | 13 def build(ctx): |
14 ctx.run(f'yarn run webpack-build', pty=True) # --debug --display-error-details | 14 ctx.run(f'npm run webpack-build', pty=True) |
15 ctx.run(f'cp build/streamed-graph.bundle.js /my/site/homepage/www/rdf/streamed-graph.bundle.js') | 15 ctx.run(f'cp build/bundle.js /my/site/homepage/www/rdf/streamed-graph.bundle.js') |
16 ctx.run(f'cp src/streamed-graph.css /my/site/homepage/www/rdf/streamed-graph.css') | 16 ctx.run(f'cp src/streamed-graph.css /my/site/homepage/www/rdf/streamed-graph.css') |
17 | 17 |
18 @task | 18 @task |
19 def build_forever(ctx): | 19 def build_forever(ctx): |
20 ctx.run(f'yarn run webpack-build-forever', pty=True) | 20 ctx.run(f'npm run run webpack-build-forever', pty=True) |
21 | 21 |
22 @task | 22 @task |
23 def dev_server(ctx): | 23 def dev_server(ctx): |
24 ctx.run(f'yarn webpack-dev-server', pty=True) | 24 ctx.run(f'npm run webpack-dev-server', pty=True) |
25 | 25 |
26 @task | 26 @task |
27 def test(ctx): | 27 def test(ctx): |
28 ctx.run(f'yarn test', pty=True) | 28 ctx.run(f'npm run test', pty=True) |
29 | 29 |
30 @task | 30 @task |
31 def test_forever(ctx): | 31 def test_forever(ctx): |
32 ctx.run(f'yarn test-forever', pty=True) | 32 ctx.run(f'npm run test-forever', pty=True) |
33 | |
34 # one time per machine: | |
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. |