是否有必要 git 忽略 React Native 项目中的 .expo-shared 文件夹?

EDM*_*OZO 6 react-native expo

我两个月前开始使用React Native,当我通过expo init创建我的项目时,我看到.expo-shared没有被忽略,而且它似乎包含像令牌之类的东西,所以作为一个具有Web开发背景的新手,我想知道是否可以将其推送到公共存储库。

raa*_*rts 18

该文件夹中有一个自述文件,内容如下:

> Why do I have a folder named ".expo-shared" in my project?

The ".expo-shared" folder is created when running commands that produce state that is intended to be shared with all developers on the project. For example, "npx expo-optimize".

> What does the "assets.json" file contain?

The "assets.json" file describes the assets that have been optimized through "expo-optimize" and do not need to be processed again.

> Should I commit the ".expo-shared" folder?

Yes, you should share the ".expo-shared" folder with your collaborators.
Run Code Online (Sandbox Code Playgroud)

所以这应该回答你的问题


小智 -3

我没有 git-ignored 我的,一切都很好,但由于这是一个 expo 内部文件夹,您可以将其添加到 git-ignored 文件中而不会出现问题。