Skip to content

ba-archive/blue-archive

Repository files navigation

碧蓝档案剧情站

简体中文 | English

子项目 (monorepos)

环境信息

项目采用 rush.js 组织 monorepo, 统一各个项目的代码规范和依赖, 优化引入项目公用包形式

  • 当前 rush 版本:5.120.6
  • 推荐 node 版本:>=14.15.0 <=22.* (测试可用版本:v22.2.0
  • 项目包管理器版本信息:pnpm@latest (测试可用版本:9.1.2

配置教程

安装 node18(推荐使用 nvm

linux 安装教程

# Linux
# 安装 nvm https://github.com/nvm-sh/nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

# 安装 node
nvm install 18
nvm use 18

对于 windows 系统推荐先安装 scoop,然后使用 scoop 安装 nvm,最后使用 nvm 安装 node

# Windows
# 安装 scoop
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser # Optional: Needed to run a remote script the first time
irm get.scoop.sh | iex

# 安装 nvm
scoop install nvm

# 安装 node
nvm install 18
nvm use 18

安装 rush

# 安装 pnpm
npm install -g pnpm
npm install -g @microsoft/rush
rush update # 在 blue-archive 根目录下执行,下同
# 编译项目、链接项目
rush build

常用命令

对一个子库新增依赖

-m 将所有其他库的依赖保持一致

rush add -p <库名> [--dev] [-m]

git commit 时禁用自动格式化 hook

git commit -m "..." --no-verify

更新依赖

rush add --make-consistent -p <库名>

项目结构

正确的使用 eslint 和 lint-staged

deprecated 已过时

eslint lint-staged 配置文件

  • .eslintrc
  • .eslintignore
  • .lintstagedrc.mjs
  • common/autoinstallers/rush-eslint/.eslintrc
  • common/autoinstallers/rush-eslint/.lintstagedrc_base.mjs

全局 tsconfig

  • lib/ba-rig/profiles/default/tsconfig-base.json

正确使用 .vscode 文件夹

.vscode 文件夹内可以保存项目推荐的扩展,settings.json 还可以用来统一一些 vscode 设置,比如 typo 插件的词库。

About

碧蓝档案的档案。我们期待着更多老师的加入,欢迎通过邮件、B站私信或 discussion 联系我们

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 14