What should I put in a meteor .gitignore file?

2019-03-08 09:08发布

I have a new meteor project. I'm guessing the .meteor dir has a combination of configuration files (needed) and temporary files (not needed).

So what's in your .gitignore?

15条回答
Fickle 薄情
2楼-- · 2019-03-08 09:40

you will need to put installed packages directory named node_modules which is located in root directory. and while you commit project it will be ignored. also product manager can easily install packages in their server using package.json.

查看更多
欢心
3楼-- · 2019-03-08 09:41
### 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
查看更多
Juvenile、少年°
4楼-- · 2019-03-08 09:42

According to this article, you should ignore your settings.json, especially if you have environment specific information to include API keys.

查看更多
Ridiculous、
5楼-- · 2019-03-08 09:43

you can use this site https://www.gitignore.io/ to generate a .gitignore file for any project , just insert the thechnologies you use and your IDE

查看更多
We Are One
6楼-- · 2019-03-08 09:47

This is the .gitignore file I use with Intellij:

  node_modules/
  .meteor/local/*
  .idea/
  npm-debug.log
  packages/*/.npm/
查看更多
地球回转人心会变
7楼-- · 2019-03-08 09:47

.meteor/local is the only thing you want missing from version control.

Meteor automatically generates a .gitignore file that would fit your needs.

If it's a public repository you'll likely want to include "settings-development.json" or any other JSON files containing information you don't want to disclose to the public such as AWS API keys.

However Bitbucket and some others provides free private repositories which should fit your needs.

查看更多
登录 后发表回答