Skip to content

Round-Studio/PluginMarket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PluginMarket

一个可以直接部署到 Cloudflare Pages 的插件市场后端示例。

数据目录

插件信息放在 public/plugin 下,目录结构为:

public/plugin/{用户名}/{插件名}/plugin.json

每个 plugin.json 包含:

  • repositoryUrl:插件仓库地址
  • repositoryOwner:仓库主
  • repositoryName:仓库名
  • pluginName:插件名
  • icon:插件图标文件名,图标文件放在同一个插件目录下

示例:

public/plugin/MinecraftYJQ/BedrockBoot.Pro/plugin.json
public/plugin/MinecraftYJQ/BedrockBoot.Pro/icon.png
{
	"repositoryUrl": "https://github.com/MinecraftYJQ/BedrockBoot.Pro",
	"repositoryOwner": "MinecraftYJQ",
	"repositoryName": "BedrockBoot.Pro",
	"pluginName": "BedrockBoot.Pro",
	"icon": "icon.png"
}

由于 Cloudflare Pages Functions 运行时不能直接枚举静态资源目录,项目会在开发/部署前自动扫描 public/plugin 并生成 public/plugin/index.json

也可以手动生成索引:

npm run generate:index

API

  • GET /api/plugins:返回全部插件
  • GET /api/plugins/:username/:pluginName:返回指定插件

本地运行

安装依赖后运行开发服务:

npm install
npm run dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors