mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
flowconfig adds flow/ folder
Summary:This change adds the `flow/` folder to the generated `.flowconfig` in new/upgraded projects. The absence of this folder was causing flow bugs to appear in projects consuming react-native that weren't visible in react-native itself. By including the same definition in consuming projects these errors disappear. Fixes https://github.com/facebook/react-native/issues/6428. **Test plan (required)** Tested `react-native upgrade` with this change and ensured that the generated `.flowconfig` works and didn't throw flow errors. Closes https://github.com/facebook/react-native/pull/6430 Differential Revision: D3071701 fb-gh-sync-id: f28f4d8f7e63669386766b6f226144adeda32c85 shipit-source-id: f28f4d8f7e63669386766b6f226144adeda32c85
This commit is contained in:
committed by
Facebook Github Bot 3
parent
61483aa15d
commit
322f210e64
@@ -19,7 +19,7 @@ function copyAndReplace(src, dest, replacements) {
|
||||
} else {
|
||||
var content = fs.readFileSync(src, 'utf8');
|
||||
Object.keys(replacements).forEach(function(regex) {
|
||||
content = content.replace(new RegExp(regex, 'g'), replacements[regex]);
|
||||
content = content.replace(new RegExp(regex, 'gm'), replacements[regex]);
|
||||
});
|
||||
fs.writeFileSync(dest, content);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user