Setup grunt flow task and run on travis (#6684)

(cherry picked from commit c9504d99a5)
This commit is contained in:
Paul O’Shannessy
2016-06-14 15:29:35 -07:00
parent 4725941c74
commit 440543aa88
5 changed files with 28 additions and 2 deletions
+1
View File
@@ -83,6 +83,7 @@ env:
- TEST_TYPE=build
- TEST_TYPE=test
- TEST_TYPE=lint
- TEST_TYPE=flow
- TEST_TYPE=build_website
global:
# SERVER
+2
View File
@@ -56,6 +56,8 @@ module.exports = function(grunt) {
grunt.registerTask('lint', ['eslint']);
grunt.registerTask('flow', require('./grunt/tasks/flow'));
grunt.registerTask('delete-build-modules', function() {
// Use gulp here.
spawnGulp(['react:clean'], null, this.async());
+22
View File
@@ -0,0 +1,22 @@
'use strict';
var grunt = require('grunt');
var extension = process.platform === 'win32' ? '.cmd': '';
module.exports = function() {
var done = this.async();
grunt.util.spawn({
cmd: 'node_modules/.bin/flow' + extension,
args: ['check', '.'],
opts: {stdio: 'inherit'},
}, function(err, result, code) {
if (err) {
grunt.log.error('Flow failed');
} else {
grunt.log.ok('Flow passed');
}
done(code === 0);
});
};
+2 -1
View File
@@ -38,8 +38,9 @@
"eslint": "1.10.3",
"eslint-plugin-react": "4.1.0",
"eslint-plugin-react-internal": "file:eslint-rules",
"fbjs": "^0.8.0",
"fbjs": "^0.8.1",
"fbjs-scripts": "^0.6.0",
"flow-bin": "0.24.0",
"glob": "^6.0.1",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
+1 -1
View File
@@ -23,7 +23,7 @@
"node": ">=0.10.0"
},
"dependencies": {
"fbjs": "^0.8.0",
"fbjs": "^0.8.1",
"loose-envify": "^1.1.0",
"object-assign": "^4.1.0"
},