V
V
VicTHOR2021-06-09 09:00:17
Composer
VicTHOR, 2021-06-09 09:00:17

How to run composer create-project instead of composer-install or run post-create-project-cmd?

There is a ready project on Yii2, I installed it via git. Launched composer installand received, for example, bower-asset folder in vendor instead of bower .
Composer has this section:

"scripts": {
    "post-create-project-cmd": [
        "yii\\composer\\Installer::postCreateProject"
    ]
},
"extra": {
    "yii\\composer\\Installer::postCreateProject": {
        "setPermission": [
            {
                "runtime": "0777",
                "web/assets": "0777",
                "yii": "0755"
            }
        ],
        "generateCookieValidationKey": [
            "config/web.php"
        ]
    },
    "asset-installer-paths": {
        "npm-asset-library": "vendor/npm",
        "bower-asset-library": "vendor/bower"
    }
}

Those. specifying that bowe-asset should appear in vendor/bower works with the command composer create-projectand doesn't work with composer install.
How to run post-create-project-cmd in this situation? Manual enumeration is not suitable, I'm setting up the docker.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VicTHOR, 2021-06-09
@VicTHOR

first composer global require fxp/composer-asset-plugin, thencomposer install

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question