Draven
Draven

Reputation: 1467

Create folder when installing composer package

Is it possible for a composer package to create a folder (or folders) in the root directory of the project?

For example:

/ansible
/application
/public
/composer.json
/composer.lock

I run composer install to install my package (framework). Can this framework create the folders /logs in my root directory?

Upvotes: 1

Views: 2768

Answers (1)

Paul Cream
Paul Cream

Reputation: 198

You might want to have a look at https://getcomposer.org/doc/articles/scripts.md and check the post-install-cmd event name and supply your own script to create your needed directories.

Upvotes: 2

Related Questions