Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yeoman generator for laravel5 - issue with composer create-project

This question is mainly regarding yeoman and composer create-project command.
I am developing a yeoman generator for laravel5 and the issue I'm facing is that to install laravel, I need to run composer create-project which creats a new folder called laravel inside the root directory.
However, most yeoman packages generate the application in the root directory and all yeoman helpers work assuming that your files are in the root directory as well (for instance npmInstall looks for package.json at the root level).

Composer does not YET support creating a project in the same directory even if it was empty (https://github.com/composer/composer/issues/1135).

So I thought that I only have this solution:

  • composer create-project in a temporary folder then move it's content back to the root folder and delete the temporary folder (node modules recommendations for that?)

Is there any better way? If not, what are some node modules recommendations for moving the content of the folder up to the root directory (I had issues with that to make it cross platform).

I think this question should not be considered as too localized because it might help other yeoman contributors when working with composer.

like image 456
Jad Joubran Avatar asked Nov 28 '25 13:11

Jad Joubran


1 Answers

Now composer can create project in current directory if provided empty.

You can follow the detailed discussion over here on github.

create project in same directory

With this you wont have to use any node module to achieve file transfer.

like image 134
Sushant Avatar answered Dec 01 '25 13:12

Sushant



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!