How does composer create a project in the current directory?

藏色散人
Release: 2021-04-14 10:24:09
forward
1896 people have browsed it

The following tutorial column of composer will introduce how composer creates a project in the current directory. I hope it will be helpful to friends in need!

How does composer create a project in the current directory?

Specific question:

How does composer create a project in the current directory instead of creating a folder under the current folder? Called the project root directory

composer create-project laravel/laravel mylaravel 5.1.* --prefer-dist
Copy after login

Assume that the current directory is laravel51. After using this command, a mylaravel folder will be created under the laravel51 directory, which contains the project. How to create a project in the current directory

Do not create that subfolder

Solution:

"create-project" command. Pass a package name and it will create the project's directory for you. This command is designed like this, so you might as well cancel the directory creation once.

If you want to create the directory yourself, you can use composer.json to introduce the corresponding dependencies and execute composer install
composer document (https://docs.phpcomposer.com/03-cli.html#create -project)

The above is the detailed content of How does composer create a project in the current directory?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template