From 5d39430258b709348d6548f2660f838ddcaa573d Mon Sep 17 00:00:00 2001 From: Brent Vatne Date: Mon, 13 Apr 2015 22:10:00 -0700 Subject: [PATCH] Add a .flowconfig, remove more unnecessary code --- .flowconfig | 32 ++++++++++++++++++++++++++ Examples/AnimatedGradient/package.json | 2 +- LinearGradient.ios.js | 13 ++++++----- 3 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 .flowconfig diff --git a/.flowconfig b/.flowconfig new file mode 100644 index 0000000..3cf7ab7 --- /dev/null +++ b/.flowconfig @@ -0,0 +1,32 @@ +[ignore] + +# We fork some components by platform. +.*/*.web.js +.*/*.android.js + +# Some modules have their own node_modules with overlap +.*/node_modules/node-haste/.* + +# Ignore react-tools where there are overlaps, but don't ignore anything that +# react-native relies on +.*/node_modules/react-tools/src/vendor/core/ExecutionEnvironment.js +.*/node_modules/react-tools/src/browser/eventPlugins/ResponderEventPlugin.js +.*/node_modules/react-tools/src/browser/ui/React.js +.*/node_modules/react-tools/src/core/ReactInstanceHandles.js +.*/node_modules/react-tools/src/event/EventPropagators.js +.*/node_modules/flux/lib/invariant.js + +# Ignore jest +.*/node_modules/jest-cli/.* + +# Ignore examples +.*/Examples/.* + +[include] + +[libs] +node_modules/react-native/Libraries/react-native/react-native-interface.js +interfaces.js + +[options] +module.system=haste diff --git a/Examples/AnimatedGradient/package.json b/Examples/AnimatedGradient/package.json index ce6e4ec..408ece6 100644 --- a/Examples/AnimatedGradient/package.json +++ b/Examples/AnimatedGradient/package.json @@ -7,6 +7,6 @@ }, "dependencies": { "react-native": "^0.3.10", - "react-native-linear-gradient": "^0.1.6" + "react-native-linear-gradient": "^0.1.7" } } diff --git a/LinearGradient.ios.js b/LinearGradient.ios.js index 7b7a283..1f95d44 100644 --- a/LinearGradient.ios.js +++ b/LinearGradient.ios.js @@ -1,11 +1,12 @@ -var React = require('React'); -var NativeModules = require('NativeModules'); +/** + * @providesModule LinearGradient + * @flow + */ + +'use strict'; + var ReactIOSViewAttributes = require('ReactIOSViewAttributes'); -var StyleSheet = require('StyleSheet'); var createReactIOSNativeComponentClass = require('createReactIOSNativeComponentClass'); -var PropTypes = require('ReactPropTypes'); -var NativeMethodsMixin = require('NativeMethodsMixin'); -var flattenStyle = require('flattenStyle'); var merge = require('merge'); var deepDiffer = require('deepDiffer');