{"id":18733170,"url":"https://github.com/bioforestchain/pkgm","last_synced_at":"2025-10-12T14:42:31.568Z","repository":{"id":37930358,"uuid":"346276504","full_name":"BioforestChain/pkgm","owner":"BioforestChain","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-27T06:12:32.000Z","size":32302,"stargazers_count":5,"open_issues_count":20,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-11T23:11:49.365Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BioforestChain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-10T07:57:17.000Z","updated_at":"2024-10-23T09:56:24.000Z","dependencies_parsed_at":"2023-01-17T21:30:13.778Z","dependency_job_id":null,"html_url":"https://github.com/BioforestChain/pkgm","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioforestChain%2Fpkgm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioforestChain%2Fpkgm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioforestChain%2Fpkgm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioforestChain%2Fpkgm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BioforestChain","download_url":"https://codeload.github.com/BioforestChain/pkgm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248613461,"owners_count":21133520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T15:08:55.717Z","updated_at":"2025-10-12T14:42:26.531Z","avatar_url":"https://github.com/BioforestChain.png","language":"TypeScript","readme":"# Package Management Toolset\n\npkgm 是一套用于 BFS 生态下应用开发的工具集。\n目前主要提供了`@bfchain/pkgm-bfsp`和`@bfchain/pkgm-bfsw`，分别用于管理单项目和多项目的开发。\n\n## 目标 Goals\n\n- 🎯 专注于[TypeScript](https://www.typescriptlang.org/)开发而无需关心各种配置文件\n- 🍔 支持多平台编译，通过定义不同 Profile，一次编译，到处运行\n- 🧩 兼容 npm 生态\n\n## 快速开始，Get Started\n\n### 单项目开发(bfsp)\n\n1. 全局安装 `@bfchain/pkgm`\n\n   ```shell\n   npm i -g @bfchain/pkgm\n   # or\n   yarn global add @bfchain/pkgm\n   ```\n\n1. 创建项目\n\n   ```shell\n   bfsp create \u003cprojectName\u003e\n   ```\n\n1. 根据指令进入对应目录开始启动开发\n\n   ```shell\n   cd \u003cprojectName\u003e \u0026\u0026 bfsp dev\n   ```\n\n### 工作空间(bfsw)\n\n\u003e 将多个项目组合在一起，联动编译。对应传统的`monorepo`开发风格\n\n1. 创建项目\n\n   ```shell\n   bfsw create \u003cprojectName\u003e\n   ```\n\n1. 根据指令进入对应目录开始启动开发\n\n   ```shell\n   cd \u003cprojectName\u003e \u0026\u0026 bfsw dev\n   ```\n\n## 配置\n\n### #bfsp.ts (TBD)\n\n### #bfsw.ts (TBD)\n\n## How to contribute\n\n工作方式\u0026流程参考 [./flow.md](./flow.md)\n\n## 开发者\n\n### 快速开始参与开发\n\n```shell\nyarn install # 安装依赖\nyarn dev # 启动tsc编译\n\n# 使用tsc编译出来的文件即可运行\nnode path/to/bfsp/dist/src/bin/bfsp.cmd.mjs dev\nnode path/to/bfsw/dist/src/bin/bfsw.cmd.mjs dev\n```\n\n### 打包发布\n\n打包发布 bin 文件，即 bfsp 与 bfsw 两个指令，这里使用 vite 编译。\n因为该项目依赖了很多工具链，如果要直接使用 tsc 编译出来的结果来运行的话，会导致用户安装`@bfchain/pkgm`的时间会很长。\n所以我们将很多依赖调整成`devDependencies`，所以用户在安装`@bfchain/pkgm`的时候就会节省很多时间。但于此同时，bin 文件要正常运行，就要在开发阶段将这些`devDependencies`进行 bundle。\n\n```shell\n# 在运行了yarn dev 且编译通过之后\n\nnpm i -g lerna # 手动全局安装 lerna\nyarn bin:dev # 使用 lerna 来并行执行多个指令\n\n# 使用vite编译出来的文件运行\nnode path/to/bfsp/build/bfsp.bin.mjs dev\nnode path/to/bfsw/build/bfsw.bin.mjs dev\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbioforestchain%2Fpkgm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbioforestchain%2Fpkgm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbioforestchain%2Fpkgm/lists"}