我有一个新的 Meteor 项目。我猜测 .meteor
文件夹包含了一些配置文件(必需的)和一些临时文件(不需要的)。
那么你的 .gitignore
文件里包含什么呢?
唯一不想被版本控制的目录是.meteor/local
。
Meteor会自动创建正确的.meteor
和.meteor/.gitignore
,因此您不需要做任何事情。
settings.json
存储 API 密钥,那么应该忽略它。 - Jesse如果您正在推送到公共存储库,那么您可能希望将任何配置设置文件放在其中。
我会将任何安全敏感的数据配置设置(如加密密钥和各种密码,例如smtp、twitter、facebook等)存储在config.js中,然后将其放入.gitignore或info/exclude文件中。我不想让这些东西出现在公共存储库中。
这只是一个额外的建议,可以考虑将其添加到您的.gitignore文件中。
public/node_modules
并且您需要使用正确编写的package.json来管理node模块依赖项安装。在 Meteor 1.3 中,您还需要忽略 node_modules
。没有理由将所有库都添加到 Git 中,因为您可以通过 npm 安装它们。 node_modules
文件夹很可能比您的应用程序(不包括 .meteor/local
文件夹)要大。
如果你使用的是
.idea
文件夹sublime-project
和 sublime-workspace
如果你是 Mac 用户,请忽略 DS_Store
如果你使用 npm,请忽略 npm
。因为如果 Windows 和 Mac 用户在同一项目上工作,由于相同的 npm 版本在 Mac 和 Windows 上不同,会导致错误。
### 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
# 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/*
您需要将安装的软件包目录命名为node_modules,该目录位于根目录中。在提交项目时,它将被忽略。此外,产品经理可以使用package.json轻松地在他们的服务器上安装软件包。
settings.json
特别是如果您在其中有 API 令牌。 - Jesse.idea/
- Dude