Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Commit

Permalink
Fix install / build by using latest LTS node (#364)
Browse files Browse the repository at this point in the history
* Fix #363 by using latest LTS node

Signed-off-by: Joe Farro <[email protected]>

* Do not test pre-LTS versions of node in travis

Signed-off-by: Joe Farro <[email protected]>

* Do not save prom-client to package.json

Signed-off-by: Joe Farro <[email protected]>
  • Loading branch information
tiffon authored and yurishkuro committed May 10, 2019
1 parent a12692c commit 5c89fa5
Show file tree
Hide file tree
Showing 6 changed files with 7,591 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6
lts/dubnium
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
sudo: required

# Travis will use .nvmrc, by default
language: node_js

node_js:
- '6'

cache:
directories:
- ~/.npm
Expand All @@ -19,9 +17,9 @@ matrix:
sudo: required
services:
- docker
- env: TEST_NODE_VERSION=6 LINT=1 COVER=1
- env: TEST_NODE_VERSION=4
- env: TEST_NODE_VERSION=node
- env: TEST_NODE_VERSION=6
- env: TEST_NODE_VERSION=10 LINT=1 COVER=1

env:
global:
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
-include crossdock/rules.mk

NODE_VER=$(shell node -v)
ifeq ($(patsubst v6.%,matched,$(NODE_VER)), matched)
NODE_6=true
ifeq ($(patsubst v10.%,matched,$(NODE_VER)), matched)
NODE_LTS=true
else
NODE_6=false
NODE_LTS=false
endif
ifeq ($(patsubst v0.10%,matched,$(NODE_VER)), matched)
NODE_0_10=true
Expand All @@ -26,7 +26,7 @@ test: build-node
.PHONY: test-without-build
test-without-build: install-test-deps
npm run flow
ifeq ($(NODE_6),true)
ifeq ($(NODE_LTS),true)
npm run test-all
endif
npm run test-dist
Expand All @@ -35,16 +35,16 @@ endif
.PHONY: install-test-deps
install-test-deps:
ifeq ($(NODE_0_10), false)
npm install [email protected]
npm install --no-save [email protected]
endif

.PHONY: check-node-6
check-node-6:
@$(NODE_6) || echo Build requires Node 6.x
@$(NODE_6) && echo Building using Node 6.x
.PHONY: check-node-lts
check-node-lts:
@$(NODE_LTS) || echo Build requires Node 10.x
@$(NODE_LTS) && echo Building using Node 10.x

.PHONY: build-node
build-node: check-node-6 node-modules
build-node: check-node-lts node-modules
rm -rf ./dist/
node_modules/.bin/babel --presets env --plugins transform-class-properties --source-maps -d dist/src/ src/
node_modules/.bin/babel --presets env --plugins transform-class-properties --source-maps -d dist/test/ test/
Expand Down
Loading

0 comments on commit 5c89fa5

Please sign in to comment.