From 66649018ae08ac5198ddd65e8caab1a6c25b4e9e Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 27 Jul 2018 10:07:00 -0700 Subject: [PATCH] Speed up examples CI builder (#572) No need to `npm install` a bunch of times, we only need to do it once! --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a29fd2bac..f6b47068a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,13 +51,14 @@ matrix: # All examples work - rust: nightly env: JOB=examples-build - install: *INSTALL_NODE_VIA_NVM + before_install: *INSTALL_NODE_VIA_NVM + install: npm ci --verbose script: - - mkdir node_modules - | for dir in `ls examples | grep -v README | grep -v asm.js | grep -v no_modules`; do (cd examples/$dir && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && + sed -i 's/npm install//' build.sh && ln -s ../../node_modules . && ./build.sh) || exit 1; done