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
?
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
?
The only directory you want excluded from version control is .meteor/local
.
Meteor automatically creates the right .meteor
and .meteor/.gitignore
, though -- you shouldn't need to do anything.
You might want to put any configuration settings files in there if you are pushing to a public repos.
I store any security sensitive data configuration settings like encryption keys and various passwords for services like smtp, twitter, facebook and others in a config.js and then put that in .gitignore or in the info/exclude file. Stuff I don't want in a public repo.
Just an additional suggestion to consider for your .gitignore
Your gitignore should also contain:
public/node_modules
And you supplement this with a properly crafted package.json that manages node module dependency installation.
This will necessitate a npm install when installed somewhere new.
According to this article, you should ignore your settings.json
, especially if you have environment specific information to include API keys.
With meteor 1.3 you want to also ignore node_modules
. There is no reason to have all of the libraries added to git because you can install them through npm. The node_modules
folder most likely is larger than your app (excluding the .meteor/local
folder)
Meteor creates a .gitignore
in the .meteor
directory by default.
However, your project's .gitignore
should exclude any sensitive data config files and node_modules
.
if you use
.idea
folder sublime-project
sublime-workspace
if you are mac user you can ignore DS_Store
and if you use npm ignore npm
cause if both windows and mac user work on same project, as the same npm version is different for mac and windows it shows error.
Here is what I use with Webstorm and Meteor 1.4 deployed with Mupx.
# 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/*
We use this gitignore, which englobes many IDEs and Meteor, along system files and others.
### 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
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.
### 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
This is the .gitignore file I use with Intellij:
node_modules/
.meteor/local/*
.idea/
npm-debug.log
packages/*/.npm/
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
.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.