A
A
AlexRas2017-06-21 10:57:46
PHP
AlexRas, 2017-06-21 10:57:46

How to move a folder using composer update?

Hello, in composer.json under windows it is done like this:

"scripts": {
    "post-install-cmd": [
        "npm install",
        "bower install",
        "rename node_modules npm",
        "move npm vendor"
    ],
    "post-update-cmd": [
        "composer run-script post-install-cmd"
    ]
}

That is, after executing composer update or composer install, npm and bower packages are installed.
Everything is clear with bower, but npm adds packages to the folder where package.json is located, but you need to add them to the vendor/npm folder.
The question is how to move the contents of the node_modules folder to vendor/npm under any systems (linux, windows, etc.)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Volintsev, 2017-06-22
@copist

The answer is described in detail on stackoverflow https://stackoverflow.com/a/14867050
Found with the query "npm vendor/node_modules", the first result in the list

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question