mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
c67e1fe42f
Summary: *This is a follow-up to https://github.com/facebook/react-native/issues/28645, redone using a build script based off of Metro's build script instead of using `flow-remove-types` and `flow-copy-source`.* This pull request adds a build step to `react-native-codegen` that builds the Flow-annotated JS files so that users of the NPM module `react-native-codegen` do not need to use require hooks to be able to import it. A new build script, `scripts/build.js` is added that builds every JS file in `src/` into a `lib/` folder, and also copies over the original Flow annotated files to `lib/` with a `.js.flow` extension, so users of `react-native-codegen` can still typecheck against it using Flow. The shell scripts in `src` are also copied over. It is based off of the [build script from Metro](https://github.com/facebook/metro/blob/00867816eb9b2f69c8af9cebb523e9e4d280671a/scripts/build.js) ## Changelog [General] [Added] - Codegen: Add prepublish script to build Flow files Pull Request resolved: https://github.com/facebook/react-native/pull/28827 Test Plan: I am able to make use of the Codegen scripts without needing to use the `flow-node` CLI or the `flow-remove-types/register` require hook. Reviewed By: cpojer Differential Revision: D21412173 Pulled By: hramos fbshipit-source-id: 26ae67cdd04652ca4700a069a234a25558773cb1
108 lines
1.7 KiB
Plaintext
108 lines
1.7 KiB
Plaintext
# Xcode
|
|
!**/*.xcodeproj
|
|
!**/*.pbxproj
|
|
!**/*.xcworkspacedata
|
|
!**/*.xcsettings
|
|
!**/*.xcscheme
|
|
*.pbxuser
|
|
!default.pbxuser
|
|
*.mode1v3
|
|
!default.mode1v3
|
|
*.mode2v3
|
|
!default.mode2v3
|
|
*.perspectivev3
|
|
!default.perspectivev3
|
|
xcuserdata
|
|
*.xccheckout
|
|
*.moved-aside
|
|
DerivedData
|
|
*.hmap
|
|
*.ipa
|
|
*.xcuserstate
|
|
project.xcworkspace
|
|
|
|
# Gradle
|
|
/build/
|
|
/RNTester/android/app/build/
|
|
/RNTester/android/app/gradle/
|
|
/RNTester/android/app/gradlew
|
|
/RNTester/android/app/gradlew.bat
|
|
/ReactAndroid/build/
|
|
/ReactAndroid/gradle/
|
|
/ReactAndroid/gradlew
|
|
/ReactAndroid/gradlew.bat
|
|
|
|
# Buck
|
|
.buckd
|
|
buck-out
|
|
/ReactAndroid/src/main/jni/prebuilt/lib/
|
|
/ReactAndroid/src/main/gen
|
|
|
|
# Android Studio
|
|
.project
|
|
.settings
|
|
.classpath
|
|
|
|
# Watchman
|
|
.watchmanconfig
|
|
|
|
# Android
|
|
.idea
|
|
.gradle
|
|
local.properties
|
|
*.iml
|
|
/android/
|
|
|
|
# Node
|
|
node_modules
|
|
*.log
|
|
.nvm
|
|
/bots/node_modules/
|
|
package-lock.json
|
|
|
|
# OS X
|
|
.DS_Store
|
|
|
|
# Test generated files
|
|
/ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
|
|
*.js.meta
|
|
|
|
/coverage
|
|
/third-party
|
|
|
|
# Root dir shouldn't have Xcode project
|
|
/*.xcodeproj
|
|
|
|
# ReactCommon subdir shouldn't have Xcode project
|
|
/ReactCommon/**/*.xcodeproj
|
|
RNTester/build
|
|
|
|
# Libs that shouldn't have Xcode project
|
|
/Libraries/FBLazyVector/**/*.xcodeproj
|
|
/Libraries/FBReactNativeSpec/**/*.xcodeproj
|
|
/Libraries/RCTRequired/**/*.xcodeproj
|
|
/React/CoreModules/**/*.xcodeproj
|
|
/packages/react-native-codegen/**/*.xcodeproj
|
|
|
|
# CocoaPods
|
|
/template/ios/Pods/
|
|
/template/ios/Podfile.lock
|
|
/RNTester/Gemfile.lock
|
|
|
|
# Ignore RNTester specific Pods, but keep the __offline_mirrors__ here.
|
|
RNTester/Pods/*
|
|
!RNTester/Pods/__offline_mirrors
|
|
|
|
# react-native-codegen
|
|
/packages/react-native-codegen/lib
|
|
/ReactCommon/fabric/components/rncore/
|
|
/schema-native-modules.json
|
|
/schema-rncore.json
|
|
|
|
# Visual studio
|
|
.vscode
|
|
.vs
|
|
|
|
# Android memory profiler files
|
|
*.hprof
|