使用命令初始化composer包
powershellcomposer init
包说明文件
json{
"name": "xxx/xxx",
"description": "xxxxxxx",
"type": "library",
"authors": [
{
"name": "tansanpi",
"email": "liutan2008@hotmail.com"
}
],
"minimum-stability": "dev",
"require": {
"yiisoft/yii2": ">=2.0.6"
},
"config": {
"process-timeout": 1800,
"fxp-asset":{
"installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
},
"autoload": {
"psr-4": {
"xxx\\xxx\\": "src/"
}
}
}
json// composer.json
{
"name": "yiisoft/yii2-app-advanced",
"description": "Yii 2 Advanced Project Template",
"keywords": ["yii2", "framework", "advanced", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "stable",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "~2.0.6",
"yiisoft/yii2-bootstrap": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0",
"bower-asset/jquery-lazy": "^1.7",
"xxx/xxx": "~0.1.0"
},
"require-dev": {
"yiisoft/yii2-debug": "~2.0.0",
"yiisoft/yii2-gii": "~2.0.0",
"yiisoft/yii2-faker": "~2.0.0",
"codeception/verify": "~1.1.0",
"codeception/codeception": "4.0",
"codeception/module-yii2": "^1.1"
},
"config": {
"process-timeout": 1800,
"fxp-asset":{
"installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
},
"repositories": [
{
"type": "git",
"url": "私有仓库地址"
}
]
}
powershellcomposer require xxx/xxx:~0.1.0
本文作者:谭三皮
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!