Skip to content
Permalink
Browse files
chore: only use npm ci on CI environments
  • Loading branch information
robertrossmann committed Mar 5, 2019
1 parent 4144c3c commit 10da5d5da93c2ee7c8ed814750b3a94fb51f4094
Showing 1 changed file with 5 additions and 1 deletion.
@@ -3,6 +3,10 @@ SHELL := sh
export PATH := node_modules/.bin/:$(PATH)
export NODE_OPTIONS := --trace-deprecation

# On CI servers, use the `npm ci` installer to avoid introducing changes to the package-lock.json
# On developer machines, prefer the generally more flexible `npm install`. 💪
NPM_I := $(if $(CI), ci, install)

# Modify these variables in local.mk to add flags to the commands, ie.
# MOCHA_FLAGS += --reporter nyan
# Now mocha will be invoked with the extra flag and will show a nice nyan cat as progress bar 🎉
@@ -21,7 +25,7 @@ all: precompile githooks
# GENERIC TARGETS

node_modules: package.json
npm ci $(NPM_FLAGS) && lerna bootstrap && touch node_modules
npm $(NPM_I) $(NPM_FLAGS) && lerna bootstrap && touch node_modules

# Default compilation target for all source files
%.js: %.mjs node_modules babel.config.js

0 comments on commit 10da5d5

Please sign in to comment.