Skip to content

Commit

Permalink
chore(npm): add ci-or-install script (#896)
Browse files Browse the repository at this point in the history
* chore(npm): add ci-or-install script

This adds a script which checks the npm version and runs either `npm ci`
or `npm install` based on support. This is primarily to work around an
issue where `npm install` modifies `package-lock.json` for newer npm
versions.

A side benefit is that `npm ci` is slightly faster than `npm install`.

Fixes #893
  • Loading branch information
nfischer committed Oct 27, 2018
1 parent 4e861db commit 37acb86
Show file tree
Hide file tree
Showing 5 changed files with 581 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -18,7 +18,7 @@ install:
- nvm install $NODE_VERSION
- node --version
- npm --version
- npm install
- npm run ci-or-install
os:
- linux
- osx
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Expand Up @@ -15,7 +15,7 @@ install:
- set PATH=%APPDATA%\npm;%PATH%
- node --version
- npm --version
- npm install
- npm run ci-or-install

matrix:
fast_finish: false
Expand Down

0 comments on commit 37acb86

Please sign in to comment.