Skip to content

Commit

Permalink
Speed up eslint via built-in caching (jestjs#1941)
Browse files Browse the repository at this point in the history
* Speed up eslint via built-in caching

The first run will be normal speed (~7.7s on my mac), but
subsequent runs were just over a second.

* Cache safe things on the CI side for a speedup
  • Loading branch information
Evan Jacobs authored and nickpresta committed Nov 15, 2016
1 parent 99cecb3 commit aadf633
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ website/src/jest/blog
lerna-debug.log
npm-debug.log*
coverage
.eslintcache
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
language: node_js

node_js:
- "4"
- "6"

sudo: false

cache:
directories:
- "node_modules"
- ".eslintcache"

before_install: npm i -g npm@latest
script:
- npm run test-ci

script: npm run test-ci
4 changes: 4 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ install:
- npm --version
- npm install

cache:
- node_modules
- .eslintcache

test_script:
- npm run build
# Some snapshot tests don't currently work on Windows, so the tests are
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"clean-all": "rm -rf ./packages/*/node_modules; rm -rf ./integration_tests/*/*/node_modules; npm run build-clean",
"jest": "node ./packages/jest-cli/bin/jest.js",
"jest-coverage": "npm run jest -- --coverage",
"lint": "eslint .",
"lint": "eslint . --cache",
"postinstall": "node ./scripts/postinstall.js && node ./scripts/build.js",
"publish": "npm run build-clean && npm run build && lerna publish",
"test": "npm run typecheck && npm run lint && npm run build && npm run jest && npm run test-examples",
Expand Down

0 comments on commit aadf633

Please sign in to comment.