whyrusleeping / gx

A package management tool
MIT License
1.88k stars 110 forks source link

Ignore .gitignore during gx package? #139

Open vklquevs opened 7 years ago

vklquevs commented 7 years ago

When running gx package, the user may prefer it to ignore the contents of .gitignore entirely, preferring .gxignore. This could be given as a flag to gx package or kept in package.json, or it could even become default behaviour to only read .gitignore as a fallback when .gxignore does not exist.

Use case: Auto-generated files that you don't want to track in git but do want to include in a package, like HTML documentation.

vklquevs commented 7 years ago

I haven't written Go before but would be happy to make a PR for the most preferable method!

Kubuxu commented 7 years ago

This should already be a case. https://github.com/whyrusleeping/gx/blob/master/gxutil/publish.go#L24

Can you confirm it doesn't work?

vklquevs commented 7 years ago

Sorry, I re-read this and I think the double negatives of in my wording were a bit confusing. I want to be able to not respect .gitignore when running gx publish, because it contains some files I do want to publish in the gx package but don't want to keep in version control.

Kubuxu commented 7 years ago

Sorry, this is completely my fault. I just skimmed through and went to find the code.

whyrusleeping commented 6 years ago

@vklquevs interesting request, I'm not sure how to do this other than to add a --ignore-gitignore flag to the publish command. Which we could totally do.