Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upignore files in .gitignore #95
Comments
This comment has been minimized.
This comment has been minimized.
|
This is a great idea. I'll implement it when I get the time, or accept a PR for it, of course. |
This comment has been minimized.
This comment has been minimized.
|
This feels like scope creep. Unless I'm missing something, why not just put the ignore definition in |
This comment has been minimized.
This comment has been minimized.
|
I think it actually makes sense to ignore the files in Anything that's not checked into git (generated files, |
This comment has been minimized.
This comment has been minimized.
feross
added a commit
that referenced
this issue
Apr 8, 2015
This comment has been minimized.
This comment has been minimized.
|
PR out: #107 |
feross
closed this
in
#107
Apr 9, 2015
This comment has been minimized.
This comment has been minimized.
|
Released as 3.4.0. |
This comment has been minimized.
This comment has been minimized.
karissa
commented
Jun 18, 2015
|
yay |
This comment has been minimized.
This comment has been minimized.
mvayngrib
commented
Jul 20, 2015
|
instead of this, I think it should defer to git, and ignore everything not being tracked |
This comment has been minimized.
This comment has been minimized.
|
@mvayngrib That's what this change does |
This comment has been minimized.
This comment has been minimized.
mvayngrib
commented
Jul 20, 2015
|
as far as i understand deglob uses the .gitignore file. There may also be plenty of files in the directory that are not in .gitignore and that are untracked, for example all files covered in .git/info/exclude, and all files you didn't add to git yet, and may never do. I mean something like the list git-untracked would give you the command line equivalent is:
|
This comment has been minimized.
This comment has been minimized.
|
Hm, my first thought is that this will make it really hard to debug why What does npm do? My understanding is that npm only looks for |
This comment has been minimized.
This comment has been minimized.
mvayngrib
commented
Jul 20, 2015
|
good point, that is what npm does. But that just makes me think they have it wrong too! |
This comment has been minimized.
This comment has been minimized.
|
I wonder if someone's brought this up with npm? It seems likely to have come up for them if we're discussing it here (on a much smaller project). If we find a bug on their tracker about this, it would help illuminate the tradeoffs involved. |
This comment has been minimized.
This comment has been minimized.
mvayngrib
commented
Jul 20, 2015
|
no luck so far, but judging by the sheer number of issues, they must have it. Anyone else find it? |
This comment has been minimized.
This comment has been minimized.
|
https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package From what I can tell, npm will publish everything in the folder. It will also look for Perhaps npm is purposely not tied to a specific version control system? It would make sense as it ensures broader support. I can't think of any CLI tools that I use that take untracked git files into account (other than git itself). |
This comment has been minimized.
This comment has been minimized.
mvayngrib
commented
Jul 21, 2015
|
@Flet that makes sense, but also throws into doubt the use of .gitignore. I guess it depends on what standard is doing style-enforcement for: modules to be published in npm (a fraction of javascript projects), or all javascript projects. If it's the first, it would be best to defer to npm to see what files it plans to publish (if this is possible). If it's the second, then maybe standard can have options like "standard --git" or "standard --npm". Just an idea. |
This comment has been minimized.
This comment has been minimized.
karissa
commented
Jul 21, 2015
|
How about keeping it the way it is, but letting you change that default standard --ignore=/path/to/.ignore Would that be a nice compromise? On Tuesday, July 21, 2015, Mark Vayngrib notifications@github.com wrote:
Karissa McKelvey Send me an encrypted message: |
This comment has been minimized.
This comment has been minimized.
|
@mvayngrib Can't you just add your untracked files to the "standard.ignore" property in |
This comment has been minimized.
This comment has been minimized.
mvayngrib
commented
Jul 21, 2015
|
@feross it's not a problem for me to just have "scripts": {
"style": "standard $(git ls-files '**.js')"
}this works just fine and does what I want it to. I was just curious what other people thought. |
mafintosh commentedMar 28, 2015
i sometimes have an experimental folder in a project where i try out different things. i usually add that to .gitignore. standard however still checks javascript files inside but since that folder sometimes contains some crazy bad code it usually fails. this makes my tests not run locally because of
standard && tape test/*.js.it would be great it standard just ignored files ignored by .gitignore (similar to how npm works).