Skip to content

Commit

Permalink
Explicitly cache our node_modules in each package
Browse files Browse the repository at this point in the history
This will massively speed up the install process, which should reduce build times for the next build following this one by ~2/3. Unfortunately, globing isn't allowed, so you'll have to manually add any new packages here. 

Also, the top level node_modules isn't needed, as that's done automatically by Travis. And I changed out the "stable" version for "node", as per Travis's docs.
  • Loading branch information
timdorr authored Jul 15, 2017
1 parent d9727d3 commit ea1212a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
sudo: false
language: node_js
node_js:
- stable
- "node"
before_install:
- npm i -g npm
before_script:
- npm run build
cache:
directories:
- node_modules
- packages/react-router/node_modules
- packages/react-router-dom/node_modules
- packages/react-router-native/node_modules
- packages/react-router-config/node_modules
- packages/react-router-redux/node_modules
- packages/react-router-website/node_modules
branches:
only:
- master
Expand Down

1 comment on commit ea1212a

@mjackson
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Thanks @timdorr. This looks great! Hopefully we don't run into weird caching bugs on Travis.

Please sign in to comment.