gpt4 book ai didi

react-native - 需要将哪些文件添加到 react-native 项目的持续集成管道的版本控制中?

转载 作者:行者123 更新时间:2023-12-04 13:54:37 24 4
gpt4 key购买 nike

我正在将我的 react-native 项目添加到版本控制中。我的目的是使用 Microsoft 的 AppCenter 配置一个持续集成管道。
当我尝试将我的项目推送到 GitHub 时,有几个文件太大了。一个是iOS/Pods目录下的文件,另一个是android目录下的.hprof文件。
我很难找到关于哪些文件需要包含在这些 ci/cd 管道的版本控制中的高质量解释。
目前我的 .gitignore (取自 https://www.gitignore.io/api/reactnative )看起来像:

### ReactNative ###
# React Native Stack Base
### ReactNative.Xcode Stack ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Pods
ios/Pods/ <- can this be ignored and still have successful CI builds?

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

### ReactNative.Node Stack ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


### ReactNative.Buck Stack ###
buck-out/
.buckconfig.local
.buckd/
.buckversion
.fakebuckversion

### ReactNative.macOS Stack ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### ReactNative.Gradle Stack ###
.gradle
**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

### ReactNative.Android Stack ###
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/dictionaries
.idea/libraries

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Freeline
freeline.py
freeline/
freeline_project_description.json

### ReactNative.Linux Stack ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

# End of https://www.gitignore.io/api/reactnative
我不确定哪些文件可以忽略,哪些文件需要存在于版本控制中,以便 AppCenter 可以构建项目。例如,可以将 iOS/Pods 排除在 VC 之外吗?为什么/为什么不等对于初始提交,我的未跟踪文件是:
.buckconfig
.eslintrc.js
.firebaserc
.flowconfig
.gitignore
.idea/
.prettierrc.js
.watchmanconfig
App.js
__tests__/
android/
app.json
babel.config.js
firebase.json
functions/
index.android.js
index.js
ios/
metro.config.js
package-lock.json
package.json
src/
对于初始提交,哪些需要添加到 VC,哪些不需要?

最佳答案

I am hard-pressed to find a quality explanation of what files need to be included in version control for these ci/cd pipelines.


规则很简单:添加和提交文件。
然后尝试在本地克隆您的存储库,看看它可以在不需要任何其他文件的情况下构建。
换句话说,为项目构建和运行添加的文件是否自给自足?

关于react-native - 需要将哪些文件添加到 react-native 项目的持续集成管道的版本控制中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64627789/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com