1

I have create a module in github. When i run composer require namespace/modulename dev-develop in root magento2 folder. It get source to vendor/namespace/modulename folder.

I want put code to app/code like app/code/Namspace/Modulename.

this code in composer.json of this module.

{
    "name": "namespace/modulename",
    "description": "dev Module Base for Magento 2",
    "require": {
         "php": "~5.6.0|7.0.2|~7.0.6",
         "magento/framework": "100.1.*"
    },
    "type": "magento2-module",
    "version": "101.0.1",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
           "Namespace\\Modulename\\": ""
        }
    },
    "extra": {
        "map": [
            [
                "*",
                "Namespace/Modulename"
            ]
        ]
    }
}

Many thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.