hoaproject / Devtools

The Hoa\Devtools library.
https://hoa-project.net/
6 stars 6 forks source link

Automatically create `.gitignore` when installing #16

Closed Hywan closed 9 years ago

Hywan commented 9 years ago

Hello :smiley:,

What about creating a .gitignore file when installed through Composer?

Before composer install:

Foo/
    .git/
    composer.json
    Awesomeness.php

After composer install:

Foo/
    .git/
    .gitignore
    composer.json
    Awesomeness.php
    vendor/
        hoa/
            devtools/
            test/

Allows people to not commit useless stuff. However, .gitignore is still prompted in git status :-/. Is it just a stupid idea? Should we commit all the .gitignore file?

/cc @hoaproject/hoackers and @shulard

shulard commented 9 years ago

Hello!

Personaly, I think that .gitignore must be present in the repositories. They are important to define the library behaviour.

Why are they not present ? Is it because you have these ignore as global on your computer ?

Maybe it's useless for the non composer users... But, for the contribution process, it will be more simple to have them versioned. Like that you fork, clone and you are ready to work (I think it's a common practice in PHP development today...).

Also I can miss something about Hoa usage ...

Hywan commented 9 years ago

There is no .gitignore files so far because we don't need them. But with Composer, yes, it could be great to write some of them. Thoughts?

shulard commented 9 years ago

Ok I understand, Hoa was not created with Composer first... Also the .gitignore stay the same for all libs because it's just a composer specific...

/vendor/
composer.lock

The same way, I saw that you never put composer.lock on git. I know that it's a Composer specific feature but it allow to identify the right dependency version to use for the current lib version. Don't you think it can be a cool feature too ?

thehawk970 commented 9 years ago

Hello,

composer.lock are optionnal, cause we adopt the Rüsh Release you can read more information here : http://hoa-project.net/En/Source.html#Rush_Release

.gitignore can be cool :+1: Cheers

shulard commented 9 years ago

Ok, thanks for the link about Rüsh Release! Now I fully understand the current architecture...

Hywan commented 9 years ago

But having a .gitignore is not against Rust release. I guess it's a good think to have .gitignore files. Any volunteer to lead the work? If yes, we must open an issue on https://github.com/hoaproject/Central instead of this issue to check what we need to put inside the .gitignore.

shulard commented 9 years ago

Ok, I'll be glad to add these files :) I create the issue...

Hywan commented 9 years ago

I close this issue in favor of hoaproject/Central#22.