diff tasks.py @ 17:94629c39681c

trying to do ts+jest. WIP
author drewp@bigasterisk.com
date Thu, 12 Dec 2019 22:52:57 -0800
parents 26d3e4860adc
children 4bf74032e2e8
line wrap: on
line diff
--- a/tasks.py	Fri Dec 06 20:34:01 2019 -0800
+++ b/tasks.py	Thu Dec 12 22:52:57 2019 -0800
@@ -3,18 +3,24 @@
 
 @task
 def setup_npm(ctx):
-    ctx.run('npm install')
+    ctx.run('yarn install')
 
 @task
 def serve_demo(ctx):
-    ctx.run('node_modules/webpack-serve/bin/webpack-serve --config webpack-dev.config.ts --port 8082')
+    ctx.run('yarn webpack-dev-server --config webpack-dev.config.ts  --port 8082')
 
 @task
 def build(ctx):
-    ctx.run(f'npm run build')
+    ctx.run(f'yarn run webpack-cli --config webpack.config.js --mode production')
     ctx.run(f'cp build/streamed-graph.bundle.js /my/site/homepage/www/rdf/streamed-graph.bundle.js')
     ctx.run(f'cp streamed-graph.css /my/site/homepage/www/rdf/streamed-graph.css')
 
 @task
 def test(ctx):
-    ctx.run(f'node_modules/ts-node/dist/bin.js node_modules/jasmine/bin/jasmine --config=jasmine.json')
\ No newline at end of file
+    ctx.run(f'node_modules/.bin/webpack-cli --config webpack-test.config.ts')
+    ctx.run(f'node_modules/.bin/ts-node node_modules/.bin/jasmine --config=jasmine.json')
+
+# one time:
+# yarn policies set-version v2
+# in vscode, ctrl-p then: ext install ark120202.vscode-typescript-pnp-plugin
+# or see https://next.yarnpkg.com/advanced/pnpify for a compatibility runner.