Mercurial > code > home > repos > streamed-graph
comparison 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 |
comparison
equal
deleted
inserted
replaced
28:c751380b70c5 | 32:db0e9cbf52e5 |
---|---|
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 install') |
7 | |
7 | 8 |
8 @task | 9 @task |
9 def serve_demo(ctx): | 10 def serve_demo(ctx): |
10 ctx.run('yarn webpack-dev-server --config webpack-dev.config.ts --port 8082') | 11 ctx.run('npm run webpack-dev-server') |
12 | |
11 | 13 |
12 @task | 14 @task |
13 def build(ctx): | 15 def build(ctx): |
14 ctx.run(f'yarn run webpack-cli --config webpack.config.js --mode production') # --debug --display-error-details | 16 ctx.run(f'npm run webpack-build') |
15 ctx.run(f'cp build/streamed-graph.bundle.js /my/site/homepage/www/rdf/streamed-graph.bundle.js') | 17 ctx.run(f'cp build/bundle.js /my/site/homepage/www/rdf/streamed-graph.bundle.js') |
16 ctx.run(f'cp streamed-graph.css /my/site/homepage/www/rdf/streamed-graph.css') | 18 ctx.run(f'cp streamed-graph.css /my/site/homepage/www/rdf/streamed-graph.css') |
19 | |
17 | 20 |
18 @task | 21 @task |
19 def test(ctx): | 22 def test(ctx): |
20 ctx.run(f'node_modules/.bin/webpack-cli --config webpack-test.config.ts') | 23 ctx.run(f'npm test') |
21 ctx.run(f'node_modules/.bin/ts-node node_modules/.bin/jasmine --config=jasmine.json') | |
22 | |
23 # one time per machine: | |
24 # yarn policies set-version v2 | |
25 # in vscode, ctrl-p then: ext install ark120202.vscode-typescript-pnp-plugin | |
26 # or see https://next.yarnpkg.com/advanced/pnpify for a compatibility runner. |