Skip to content
This repository was archived by the owner on Jul 19, 2021. It is now read-only.

Add .gitignore for new projects #134

Closed
wants to merge 2 commits into from
Closed

Add .gitignore for new projects #134

wants to merge 2 commits into from

Conversation

adrhumphreys
Copy link
Contributor

Added git ignore, to ignore the node_modules and dist folder for new projects

What are you trying to accomplish with this PR?

This adds a gitignore file by default so that node_modules and dist don't get commited to sc by accident

#126

src/.gitignore Outdated
# Custom #
###################
node_modules
dist
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a trailing slash to these to signify they're directories?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops, added them in there 👍

@chrisberthe chrisberthe requested a review from NathanPJF April 28, 2017 17:49
@chrisberthe
Copy link
Contributor

chrisberthe commented Apr 28, 2017

Thanks @adrhumphreys for the PR - just a small comment. @NathanPJF I've assigned you for some additional 👀.

Added trailing backslash to explicitly state that the ignored directories are actually directories
@adrhumphreys
Copy link
Contributor Author

Awesome, @chrisberthe I've add the trailing slashes

@t-kelly
Copy link
Contributor

t-kelly commented May 1, 2017

Hey @adrhumphreys 👋 - have you had a chance to test this out?

The .gitignore file you've added won't do anything because the dist/ and node_modules/ don't live inside the src/ folder, they live inside the root folder. We have a .gitignore file for the root directory that ignores both node_modules/ and dist/.

Is the existing setup not working for you? Care to elaborate as to how you ended up with dist/ and node_modules/ in the src/ folder?

@t-kelly
Copy link
Contributor

t-kelly commented May 1, 2017

Sorry, I saw in your issue that the problem is that .gitignore is not being copied over when we create a new theme. The solution should still be to copy the .gitignore to the root folder, not the src folder.

@chrisberthe
Copy link
Contributor

As @t-kelly mentioned, this doesn't solve the issue of ignoring the node_modules and dist folder - the .gitignore should be placed inside of the root theme directory, not src.

Closing this PR for now, but we'll definitely revisit this soon - maybe we could initialize this with a flag upon running slate theme and/or slate migrate... but don't necessarily want to clutter up options for each of those commands either. We'll 🤔.

@lock
Copy link

lock bot commented Oct 26, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants