mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Setup grunt flow task and run on travis (#6684)
(cherry picked from commit c9504d99a5)
This commit is contained in:
@@ -83,6 +83,7 @@ env:
|
||||
- TEST_TYPE=build
|
||||
- TEST_TYPE=test
|
||||
- TEST_TYPE=lint
|
||||
- TEST_TYPE=flow
|
||||
- TEST_TYPE=build_website
|
||||
global:
|
||||
# SERVER
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user