From a13099d1bafd9d456c96df357032e62cc80eb819 Mon Sep 17 00:00:00 2001 From: Will Roberts Date: Wed, 21 Jun 2017 13:38:41 +0200 Subject: [PATCH] run "npm install" and "npm run build" during travis test --- tasks.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasks.py b/tasks.py index e008690..74291b2 100644 --- a/tasks.py +++ b/tasks.py @@ -17,10 +17,18 @@ AUTOAPP = os.path.join(COOKIE, 'autoapp.py') 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 def build(ctx): """Build the cookiecutter.""" ctx.run('cookiecutter {0} --no-input'.format(HERE)) + _run_npm_command(ctx, 'install') + _run_npm_command(ctx, 'run build') @task