MAKEFLAGS+=-j 15
NPM_BIN=$(CURDIR)/node_modules/.bin

# use NPMCACHE=y to skip loading cached packages from the registry
NPMCACHE?=n



codestyle: node_modules testonly
	npm run-script codestyle



node_modules: package.json
ifeq ($(NPMCACHE),y)
	@echo "Installing npm modules from cache, if available"
	npm install --registry http://npm.yandex-team.ru --cache-min 86400
else
# TODO: npm install в этом месте не отрабатывает в тимсити
	@echo "Loading npm modules"
	npm install --registry http://npm.yandex-team.ru
endif

# В случае, если package.json новее, чем node_modules make всегда будет выполять зависимость
	@touch node_modules



testonly:
	@sh ./tools/checkOnly.sh ./test
