view 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
line wrap: on
line source

from invoke import task  # pytype: disable=import-error


@task
def setup_npm(ctx):
    ctx.run('npm install')


@task
def serve_demo(ctx):
    ctx.run('npm run webpack-dev-server')


@task
def build(ctx):
    ctx.run(f'npm run webpack-build')
    ctx.run(f'cp build/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'npm test')