run "npm install" and "npm run build" during travis test

master
Will Roberts 7 years ago
parent 119b102693
commit a13099d1ba
  1. 8
      tasks.py

@ -17,10 +17,18 @@ AUTOAPP = os.path.join(COOKIE, 'autoapp.py')
REQUIREMENTS = os.path.join(COOKIE, 'requirements', 'dev.txt') REQUIREMENTS = os.path.join(COOKIE, 'requirements', 'dev.txt')
def _run_npm_command(ctx, command):
os.chdir(COOKIE)
ctx.run('npm {0}'.format(command), echo=True)
os.chdir(HERE)
@task @task
def build(ctx): def build(ctx):
"""Build the cookiecutter.""" """Build the cookiecutter."""
ctx.run('cookiecutter {0} --no-input'.format(HERE)) ctx.run('cookiecutter {0} --no-input'.format(HERE))
_run_npm_command(ctx, 'install')
_run_npm_command(ctx, 'run build')
@task @task

Loading…
Cancel
Save