diff --git a/local-cli/generator/index.js b/local-cli/generator/index.js index 1879fa35f6..5e11dec0b9 100644 --- a/local-cli/generator/index.js +++ b/local-cli/generator/index.js @@ -2,6 +2,7 @@ var path = require('path'); var yeoman = require('yeoman-generator'); +var utils = require('../generator-utils'); module.exports = yeoman.generators.NamedBase.extend({ constructor: function() { @@ -33,10 +34,12 @@ module.exports = yeoman.generators.NamedBase.extend({ }, configuring: function() { - this.fs.copy( - this.templatePath('_flowconfig'), - this.destinationPath('.flowconfig') + utils.copyAndReplace( + this.templatePath('../../../.flowconfig'), + this.destinationPath('.flowconfig'), + { 'Libraries\/react-native\/react-native-interface.js' : 'node_modules/react-native/Libraries/react-native/react-native-interface.js' } ); + this.fs.copy( this.templatePath('_gitignore'), this.destinationPath('.gitignore') diff --git a/local-cli/generator/templates/_flowconfig b/local-cli/generator/templates/_flowconfig deleted file mode 100644 index 48f0ba0d41..0000000000 --- a/local-cli/generator/templates/_flowconfig +++ /dev/null @@ -1,48 +0,0 @@ -[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/React.js -.*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js -.*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js -.*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js - -# Ignore commoner tests -.*/node_modules/commoner/test/.* - -# See https://github.com/facebook/flow/issues/442 -.*/react-tools/node_modules/commoner/lib/reader.js - -# Ignore jest -.*/react-native/node_modules/jest-cli/.* - -[include] - -[libs] -node_modules/react-native/Libraries/react-native/react-native-interface.js - -[options] -module.system=haste - -munge_underscores=true - -module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' -module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub' - -suppress_type=$FlowIssue -suppress_type=$FlowFixMe -suppress_type=$FixMe - -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-6]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-6]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ -suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy - -[version] -0.16.0