Cotya / magento-composer-installer

Composer installer for Magento modules
211 stars 77 forks source link

[3.0.6] auto-append-gitignore doesn't prepend package-name #83

Closed possi closed 8 years ago

possi commented 8 years ago

Also 2 of 3 empty lines are removed.

composer.json:

{
    "require": {
        "magento-hackathon/magento-composer-installer": "^3.0",
        "webcomm/magento-boilerplate": "^3.0"
    },
    "extra": {
        "magento-root-dir": ".",
        "magento-deploystrategy": "symlink",
        "modman-root-dir": ".modman",
        "auto-append-gitignore": true
    }
}

.gitignore before:

/var
/media
/app/etc/local.xml

## Generated Content
robots.txt
sitemap.xml

## IDE-Stuff
.idea

## Composer
/vendor

.gitignore after:

/var
/media
/app/etc/local.xml

## Generated Content
robots.txt
sitemap.xml
## IDE-Stuff
.idea
## Composer
/vendor
/app/code/community/Webcomm/MagentoBoilerplate
/app/design/frontend/base/default/layout/magentoboilerplate.xml
/app/design/frontend/base/default/template/magentoboilerplate
/app/etc/modules/Webcomm_MagentoBoilerplate.xml

(no new line at end)

AydinHassan commented 8 years ago

Does it matter?

possi commented 8 years ago

The readme says "Every set of module files, will have a comment above them describing the module name for clarity.", but this doesn't apply. I expected this behavior and this matters to me, as I like to have a readable .gitignore.

We're planing to create a composer-project with up to 2 dozen magento-modules. With about ~6 symlinks per module, the .gitignore will soon get puzzling without labeled sections.

AydinHassan commented 8 years ago

It used to be there, however, it proved difficult to re-add at the time when I did some refactoring due to some bugs, so I left it out. I must have missed the docs.

Feel free to send a PR with the feature, in the mean time we should probably update the docs.

possi commented 8 years ago

Well, I tinker with the idea of creating a separate composer-plugin for this purpose. That way it can be limited to require-dev and can it be extended to may use .git/info/exclude instead of .gitignore. If you don't like to re-add the feature, you encourage me in creating the plugin.

So you may close the ticket if you've updated the doc. (But #84 should be merged anyway ;) )

AydinHassan commented 8 years ago

I'm quite happy for the feature to be there, I just don't have time to do it myself 🙂

Sent from my iPhone

On 10 Dec 2015, at 19:15, Jascha notifications@github.com wrote:

Well, I tinker with the idea of creating a separate composer-plugin for this purpose. That way it can be limited to require-dev and can it be extended to may use .git/info/exclude instead of .gitignore. If you don't like to re-add the feature, you encourage me in creating the plugin.

So you may close the ticket if you've updated the doc. (But #84 should be merged anyway ;) )

— Reply to this email directly or view it on GitHub.

Flyingmana commented 8 years ago

Having seperate plugins is always a good Idea I think, makes maintaining easier and increases potential for reusability.

But iam happy to merge the PR anyway, just need some time for a bit of review the changes. Also there is a conflict with a previous merged PR because both stripped some whitespaces on the same place.