搭建私有的composer源

使用composer一键安装

composer create-project composer/satis

接着在项目根目录下创建package.json文件

{
    "name": "satis packages",
    "homepage": "http://package.gbk.pw",
    "repositories": [
        { "type": "git", "url": "https://git.gbk.pw/groupxx/test.git" }
    ],
    "require":{
        "gbk/test":"dev-master"
    }
}

使用这个命令生成web HTML

php bin/satis build package.json ./web

顺利的话会出现下在界面。

Scanning packages
wrote packages to web/include/all$689690ce9732c2436d7443da0e515669219446b4.json
Writing packages.json
Pruning include directories
Deleted web/include/all$96e5c0926e9d7f87094d1ba307e38ea76cd09c53.json
Writing web view

如果出现下面界面,就是package.json require中的包名,和git composer.json中的包名不一致。

The xxx/sss master requirement did not match any package

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Captcha Code