What should I put in a meteor .gitignore file?

后端 未结 15 974
一向
一向 2021-01-30 19:14

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 i

相关标签:
15条回答
  • 2021-01-30 19:40

    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.

    0 讨论(0)
  • 2021-01-30 19:42
    1. gitignore is used to ignore all the unnecessary burden over the git server and your fetching all the time.
    2. So the best possible stuff to put inside the gitignore is packagable entity. Now, this includes the meteor downloadable packages, so, you should just add ".meteor/local" inside gitignore.
    3. When you add it to gitignore configuration, it reduces the size of project to n times smaller as it would be with the packages.
    4. If you cut-paste the entire project now to different location or fetch the repository without .meteor/local folder and start the project using meteor command, the meteor first downloads the required packages and then starts the server.
    0 讨论(0)
  • 2021-01-30 19:43

    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.

    0 讨论(0)
  • 2021-01-30 19:43

    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
    
    0 讨论(0)
  • 2021-01-30 19:47

    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

    0 讨论(0)
  • 2021-01-30 19:51

    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.

    0 讨论(0)
提交回复
热议问题