Laravel 使用:
Laravel uses:
composer create-project laravel/laravel your-project-name --prefer-dist
如何制作自己的包以便我可以使用
How can I make my own package so that I can use
composer create-project mycompany/projectx your-project-name --prefer-dist
我可以为此使用 bitbucket 私有存储库吗?
Can I use bitbucket a private repository for this ?
只要包在 packagist.org,可以使用composer create-project
命令.
As long as the package is available on packagist.org, you can use the composer create-project
command.
如果你不想把你的包放到packagist上,请参考composer从私人仓库创建项目:
If you don't want to put your package on packagist, please refer to composer create-project from private repo:
就这样……
composer create-project vendor/name path --repository-url=http://repo.yourcomposerrepo.com
因为您不会向 packagegist 提交私有包.该网址至少需要一个 packages.json 文件,您可以使用 satis 或您自己的 packagist 如果您想要更动态的 packages.json 解决方案.
Since you won't submit a private package to packagist. That url just needs a packages.json file at minimum, you could use satis or your own packagist if you want a more dynamic solution to the packages.json.
你也可以只使用git clone
,然后自己执行composer install
.
You can also just use git clone
and then execute composer install
yourself.