kentcdodds / generator-kcd-oss

A yeoman generator for my open source modules
http://yeoman.io/
MIT License
138 stars 28 forks source link

Parameterizing the github username as well #7

Closed gnapse closed 6 years ago

gnapse commented 6 years ago

Would you be open to parameterize the github user name, and adjust all relevant paths to use that, instead of kentcdodds? One reason I ask is because it's not quite equivalent to generate a new project, and then make a project-wide search-and-replace kentcdodds with my username, because there are still some places where the string kentcdodds needs to be preserved (links to things specifically in your github, like the all-contributors specification, for instance).

I've been thinking the generator could ask for it in the setup process, and even detect it from ~/.gitconfig if the user has that set there:

// ~/.gitconfig
[github]
    user = gnapse

With the above in place, then this works

$ git config --global user.gnapse
gnapse

And it could even suggest the user to save it to ~/.gitconfig.

kentcdodds commented 6 years ago

I'd be fine to have the generator ask you what username you want to use, but I don't want to overcomplicate the tool by searching for that info in ~/.gitconfig. It's a simple tool and I built it for myself. I'm happy if other people use it, but if it's going to complicate things too much for me then I'd rather people fork it :)

gnapse commented 6 years ago

I mentioned the fetching from ~/.gitconfig becuase it would reduce the impact it has on your usage. You'd be able to continue using it as you do today without having to type your github username every time. Not that that's a big deal anyway.

Ok good to know. I'm not even sure I'll do it because I'm short on time right now. But just wanted to know if you were open to the possibility, just in case I decide to jump right in (or someone else reading this). I'll leave the issue open so people can see it more easily, but feel free to close it if you prefer.

Thanks!

blackxored commented 6 years ago

iirc my generator (which is based on this one BTW) uses Git and GitHub info ignore available. I don’t think integrating those changes as is would be good but I’d be happy to help if there’s an interest for such functionality. https://github.com/blackxored/generator-bxd-oss

kentcdodds commented 6 years ago

Thanks. So long as it's not too complicated then I'm fine with it. Especially if it's just a few lines of code (because it's using an npm module for it or something).

kentcdodds commented 6 years ago

Closing for inactivity