7.上传自己的代码到 composer

1.创建一个git仓库

2.将仓库克隆下来

3.将代码src copy 到 git 目录下

4.编写composer.json

5.打开 https://packagist.org

点击 submit, 填写库地址

6.设置 git 仓库更新后,packagist 自动更新

7.用 tag 去自动更新
  git tag -a v0.1.0 -m 'init'
  git push origin --tags

{
    "name" : "weidaodao/mailqueue",

    "type" : "yii2-extension",

    "description" : "The weidaodao test",

    "keywords": ["yii2", "redis", "async", "mailer"],

    "license" : "MIT",

    "support": {
        "issues" : "http://www.baodi.com/issues",
        "forum" : "http://www.baodi.com/forum",
        "source" : "http://www.baodi.com/source"
    },

    "authors": [
      {
        "name" : "weidaodao",
        "email" : "test@email"
      }
    ],

    "require": {
       "yiisoft/yii2" : "*",
       "yiisoft/yii2-redis" : "~2.0.0"
    },

    "autoload": {
        "psr-4": {
            "weidaodao\\mailqueue\\" : "src/"
        }
    }
}

猜你喜欢

转载自blog.csdn.net/enlyhua/article/details/86265323
今日推荐