only run flow check in CI if npm 3
This commit is contained in:
2
Makefile
2
Makefile
@@ -44,7 +44,7 @@ test-cov: clean
|
||||
test-ci:
|
||||
make lint
|
||||
NODE_ENV=test make bootstrap
|
||||
./node_modules/.bin/flow check
|
||||
node scripts/run-flow-check.js
|
||||
./scripts/test-cov.sh
|
||||
cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"babel": "5.8.21",
|
||||
"babel-eslint": "^4.1.8",
|
||||
"babel-plugin-flow-comments": "^1.0.9",
|
||||
"bin-version-check": "^2.1.0",
|
||||
"browserify": "^11.2.0",
|
||||
"bundle-collapser": "^1.2.1",
|
||||
"chai": "^2.2.0",
|
||||
|
||||
15
scripts/run-flow-check.js
Normal file
15
scripts/run-flow-check.js
Normal file
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
var binVersionCheck = require("bin-version-check");
|
||||
var child = require("child_process");
|
||||
|
||||
// run in npm 3+ only
|
||||
binVersionCheck("npm", ">=3.3.0", function (err) {
|
||||
if (!err) {
|
||||
console.log("Running ./node_modules/.bin/flow check");
|
||||
var cmd = child.spawn("./node_modules/.bin/flow", ["check"], { stdio: "inherit" });
|
||||
cmd.on("exit", function(code) {
|
||||
console.log(code);
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user