GitHub Package Registry发布,了解一下!

前言

前些天GitHub发布了GitHub Package Registry(看名字就应该知道是与“包”有关的),目前仍是Beta版本。无论怎么说都值得关注一波git

1. 关于 GitHub Package Registry

GitHub Package Registry是一个包托管服务,相似npm、gem、docker之类的,容许开发者在上面托管包和代码,固然能够是私有的或公开的,并将它们用做项目中的依赖github

2. 支持的客户端和格式

GitHub Package Registry目前支持这些客户端和格式,能够使用您已熟悉的本机程序包工具命令来发布,查询,下载和更改程序包版本docker

包客户端 包格式 须要配置一下才能使用
npm package.json 详情
gem Gemfile 详情
mvn pom.xml 详情
docker container 详情
nuget nupkg 详情

3. 在GitHub上搜索包

直接在GitHub搜索框中输入 包名,而后选择左侧列表中的Packagesapache

4. 安装使用

以npm上图的“hello-world-npm”为例npm

PS:注册了测试版以后进入候选名单,我目前还无法使用,下面的安装会报错,先贴出来学习一下json

  1. 安装方式(和以前安装包的方式同样) 能够在GitHub上进入一个包里面看看,Codertocat/hello-world-npm
npm install @codertocat/hello-world-npm

// 或在package.json中添加

"dependencies": {
  "@codertocat/hello-world-npm": "1.0.0"
}
复制代码
  1. 使用
const myPackage = require('@codertocat/hello-world-npm')
myPackage.helloWorld()
复制代码

后记

若是想使用 GitHub Package Registry的公测版,请戳这里,注册后等候邮箱通知ruby

本文参考 GitHub Helpmaven

持续更新博文……感谢关注&点赞~!工具

相关文章
相关标签/搜索