Code Monkey home page Code Monkey logo

packagist's Introduction

介绍

packagist基于Hyperf构建的私有composer仓库服务

配置项目

# 修改 satis.json
{
  "name": "your-packagist-name",
  "homepage": "your-packagist-domain",
  "repositories": [
    {
      "type": "git",        // git方式
      "url": "https://gitlab.xxxxxxx.com/your-gitlab-group/your-component.git"   // 项目的git地址
    },
    {
      "type": "git",
      "url": "https://gitlab.xxxxxxx.com/your-gitlab-group/your-other-component.git"
    }
  ],
  "require": {
    "your-gitlab-group/your-component": "*",    // 组件以及组件的约束
    "your-gitlab-group/your-other-component": "*"
  }
}

更新命令

composer satis-build

配置

# 配置全局 your-composerrepository

# 阿里云镜像
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

# 伊智私有仓库
composer config -g repo.your-composer-repository composer https://your-composer-repository-domain/

# 查看是否配置成功

composer config -g --list 

看到下面两行表示配置成功

[repositories.your-packagist.org.type] composer
[repositories.your-packagist.org.url] https://your-composer-repository-domain/
[repositories.packagist.org.type] composer
[repositories.packagist.org.url] https://mirrors.aliyun.com/composer/


# 项目配置

"repositories": {
    "packagist": {
        "type": "composer",
        "url": "https://mirrors.aliyun.com/composer"
    },
    "your-packagist": {
        "type": "composer",
        "url": "https://your-composer-repository-domain"
    }
}

使用

# 一般仓库使用

composer require your-repository/your-component

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.