generate / generate-gitignore

Generate a .gitignore file from the command line when Generate's CLI is installed globally, or use as a plugin or sub-generator in your own generator.
https://github.com/generate
MIT License
113 stars 12 forks source link

Can't override it using `~/templates/_gitignore` #1

Closed tunnckoCore closed 8 years ago

tunnckoCore commented 8 years ago

It always generates some and always ask questions.

generate-editorconfig for example works.

tunnckoCore commented 8 years ago

I guess because of that generator.js#L46?

jonschlinkert commented 8 years ago

even when you do gen gitignore:node?

jonschlinkert commented 8 years ago

oh... hmmm. I guess you would need to use the name of the node template, right?

edit: so it would probably be Node.gitignore, which is great because this let's you customize your .gitignore templates based on the type of project

jonschlinkert commented 8 years ago

but also, I didn't notice this because I use update on every project i generate. I just do gen project && update :)

jonschlinkert commented 8 years ago

I just confirmed that the following works with a custom Node.gitignore template.

$ gen gitignore:node
tunnckoCore commented 8 years ago

I guess Yes it would work, but I don't want to use some of the provided. I just want to use that from ~/templates/_gitignore and i think it should work, because that's the convention.

jonschlinkert commented 8 years ago

and i think it should work, because that's the convention

No, the convention is to use the name of the template. not the generated file. For the reason I stated in https://github.com/generate/generate-gitignore/issues/1#issuecomment-245814150. If we use the name of the generated file, then you can only have one single template that will always be used for every project. You won't be able to differentiate.

Sounds like this is resolved then, right?

tunnckoCore commented 8 years ago

Okey, nevermind.