diff 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
line wrap: on
line diff
--- a/tasks.py	Tue Dec 17 23:13:01 2019 -0800
+++ b/tasks.py	Tue Dec 24 20:30:27 2019 -0800
@@ -3,35 +3,30 @@
 
 @task
 def setup_npm(ctx):
-    ctx.run('yarn install')
+    ctx.run('npm run install')
 
 @task
 def serve_demo(ctx):
-    ctx.run('yarn webpack-dev-server')
+    ctx.run('npm run webpack-dev-server')
 
 @task
 def build(ctx):
-    ctx.run(f'yarn run webpack-build', pty=True)  # --debug --display-error-details
-    ctx.run(f'cp build/streamed-graph.bundle.js /my/site/homepage/www/rdf/streamed-graph.bundle.js')
-    ctx.run(f'cp src/streamed-graph.css         /my/site/homepage/www/rdf/streamed-graph.css')
+    ctx.run(f'npm run webpack-build', pty=True)
+    ctx.run(f'cp build/bundle.js         /my/site/homepage/www/rdf/streamed-graph.bundle.js')
+    ctx.run(f'cp src/streamed-graph.css  /my/site/homepage/www/rdf/streamed-graph.css')
 
 @task
 def build_forever(ctx):
-    ctx.run(f'yarn run webpack-build-forever', pty=True)
+    ctx.run(f'npm run run webpack-build-forever', pty=True)
 
 @task
 def dev_server(ctx):
-    ctx.run(f'yarn webpack-dev-server', pty=True)
+    ctx.run(f'npm run webpack-dev-server', pty=True)
 
 @task
 def test(ctx):
-    ctx.run(f'yarn test', pty=True)
+    ctx.run(f'npm run test', pty=True)
 
 @task
 def test_forever(ctx):
-    ctx.run(f'yarn test-forever', pty=True)
-
-# one time per machine:
-# 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.
+    ctx.run(f'npm run test-forever', pty=True)