Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Node and Gulp. What should I check into Git?

Featured Replies

Hello Friends

 

I am just starting out with NodeJS and Gulp.

 

I have everything working as I want, and I now want to keep track of my changes via Git.

 

What are the files and folder that I should add to `.gitignore`? Attached is the folders I have. Inside public I have two folders. These are `src` and `dist`.

 

Any help would be greatly appreciated.

 

Thank you.

I generally just add node_modules folder to my .gitignore and any other dependencies that can be featched in a similar way to how node works with the package.json

Some people ignore their source files too, but I choose to keep mine in the repository.

 

 

Of course there's more stuff to add if you are using a CMS such as a user uploads folder, security configs etc.

Edited by rbrtsmith

  • Author

Is it a matter of adding everything that cannot be generated?

 

If that is the case, then I need to exclude:

 

  • node_modules
  • public/dist

Everything else I need, since those won't be generated.

 

On a related note, say someone checks out my solution at a different computer. How would they get node to go through the `package.json` and download all necessary modules? What command should he/she run?

 

Thanks

Edited by Ciwan

Is it a matter of adding everything that cannot be generated?

 

If that is the case, then I need to exclude:

 

  • node_modules
  • public/dist

Everything else I need, since those won't be generated.

 

On a related note, say someone checks out my solution at a different computer. How would they get node to go through the `package.json` and download all necessary modules? What command should he/she run?

 

Thanks

 

Running npm install will download the dependancies if you have a package.json file in the directory.

Is it a matter of adding everything that cannot be generated?

 

If that is the case, then I need to exclude:

 

  • node_modules
  • public/dist

Everything else I need, since those won't be generated.

 

On a related note, say someone checks out my solution at a different computer. How would they get node to go through the `package.json` and download all necessary modules? What command should he/she run?

 

Thanks

 

Not always. When I release something for public use I also publish the dist folder as not everybody who is using it will have NPM or Node or even Gulp on their machine.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.