我应该把什么在流星的.gitignore文件?(What should I put in a met

2019-07-29 13:07发布

我有一个新的流星项目。 我猜.meteor DIR有配置文件(需要)和临时文件的组合(不需要)。

那么什么是你.gitignore

Answer 1:

你想排除版本控制的唯一目录是.meteor/local

流星会自动创建正确的.meteor.meteor/.gitignore ,虽然-你不需要做任何事情。



Answer 2:

你可能想要把所有的配置设置文件在那里,如果你正在推动公共回购。

我喜欢存储加密密钥和用于SMTP一样,Twitter,Facebook和其他服务在config.js各种密码的任何安全敏感数据的配置设置,然后把在的.gitignore或在信息/排除文件。 东西我不想在公共回购。

只是一个额外的建议,考虑为您的.gitignore



Answer 3:

你gitignore也应包含以下内容:

公共/ node_modules

你有这个补充适当制作的package.json管理节点模块依赖安装。

这将需要安装一个新的地方时,NPM安装。



Answer 4:

根据这篇文章 ,你应该忽略你的settings.json ,特别是如果你有环境的具体信息,包括API密钥。



Answer 5:

一起来看流星1.3你也想忽略node_modules 。 没有理由让所有加入的Git库的,因为你可以通过NPM安装它们。 该node_modules文件夹最有可能比你大的应用程序(不包括.meteor/local文件夹)



Answer 6:

流星创建.gitignore.meteor默认目录。

然而,您的项目.gitignore应排除任何敏感数据的配置文件和node_modules



Answer 7:

如果你使用

  • 的IntelliJ IDE忽略.idea文件夹
  • 崇高文本忽略sublime-project sublime-workspace

如果你是Mac用户,你可以忽略DS_Store

并且如果您使用NPM忽略npm原因,如果在同一个项目在Windows和Mac用户的工作,因为相同的NPM版本是Mac和Windows不同的是显示错误。



Answer 8:

以下是我与Webstorm和部署Mupx流星1.4使用。

# Meteor files to ignore now handled by .ignore file within .Meteor folder automatically

# settings file to ignore to protect API keys
settings.json

# MUP / MUPX file to ignore to protect server passwords and sensitive info.
mup.json

# npm package files to ignore
node?modules/
npm-debug.log

# Webstorm IDE files to ignore
.idea/*

# Typing type definition files to ignore. Webstorm uses type definitions for autocomplete even without typescript
typings/*


Answer 9:

我们用这个gitignore,这englobes许多IDE和流星,以及系统文件等。

### WebStorm ###
.idea/

### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows shortcuts
*.lnk

### Linux ###
*~
# KDE directory preferences
.directory

### SublimeText ###
# cache files for sublime text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# workspace files are user-specific
*.sublime-workspace
# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# *.sublime-project
# sftp configuration file
sftp-config.json

### Node/NPM ###
node_modules
npm-debug.log

### Development ###
dump
mochawesome-reports
ngrok


Answer 10:

你需要把它位于根目录下安装的软件包目录中名为node_modules。 而当你提交的项目会被忽略。 同时产品经理可以在自己的服务器中使用的package.json容易安装软件包。



Answer 11:

### MeteorJS ###
# default meteor build and local packages
.meteor/local

# meteor settings file
settings.json

# meteor build output files
*.tar.gz

# general swp files from vim
*.swp

# End of https://www.gitignore.io/api/meteorjs


Answer 12:

这是我与的IntelliJ使用的.gitignore文件:

  node_modules/
  .meteor/local/*
  .idea/
  npm-debug.log
  packages/*/.npm/


Answer 13:

你可以使用本网站https://www.gitignore.io/产生任何项目的.gitignore文件,只需插入您使用thechnologies和你的IDE



Answer 14:

  1. gitignore用于忽略了git的服务器和读取所有的时间所有的不必要的负担。
  2. 所以,最好的东西给gitignore里面放是装袋的实体。 现在,这包括流星下载软件包,所以,你应该加上“.meteor /本地”里面gitignore。
  3. 当你将它添加到gitignore配置,降低项目n次,因为这将与包的大小。
  4. 如果你现在剪切粘贴整个项目到不同的位置或不.meteor /本地文件夹中取出存储库,并使用流星命令来启动该项目,流星首先下载所需的软件包,然后启动服务器。


Answer 15:

.meteor /地方是你想要的版本控制唯一缺少的东西。

流星自动生成,将满足您的需求的.gitignore文件。

如果这是你很可能要包括“设置 - development.json”或包含信息的任何其他文件的JSON你不想向公众披露,例如AWS API密钥的公共仓库。

然而到位桶和其他一些人提供了应该满足您的需求免费的私人仓库。



文章来源: What should I put in a meteor .gitignore file?