magento-hackathon / magento-composer-installer

Composer installer for Magento modules
210 stars 154 forks source link

deploystrategy "copy" would create a code directory inside the module directory #48

Closed mruoss closed 10 years ago

mruoss commented 10 years ago

Hi there

I'm using "magento-deploystrategy": "copy" to deploy magento modules in my project. Now I have a module whose composer.json contains a file map entry as follows:

{
    "extra": {
        "map": [
            ["modules/My_Module/code", "public/app/code/local/My/Module"],
        ]
    }
}

When I run composer install/update it would create the directory public/app/code/local/My/Module/code and put everything in there. I was expecting composer to deploy the content of the code directory into My/Module but not to create a subdirectory named code. Is this the expected behavior?

Thanks, Michael

Vinai commented 10 years ago

Yes, if "public/app/code/local/My/Module" already exists. It's just like the command line tool cp would behave.

mruoss commented 10 years ago

Mmmh... okay. But the result ist that composer install will create the directory and put everything in there and composer update will then create the code directory inside the module directory.

Is there a way to define in the module that all inside code should be copied into a newly created module directory?

Flyingmana commented 10 years ago

what happens if you have "modules/My_Module/code/*" on the left side?

Did not test it, but working often with the commandline, using a wildcard seems the correct solution here