fedn
v7.1.640
Published
<!-- tocstop -->
Downloads
140
Readme
fedn
Usage
$ npm install -g fedn
$ fedn COMMAND
running command...
$ fedn (-v|--version|version)
fedn/7.1.639 linux-x64 node-v12.22.12
$ fedn --help [COMMAND]
USAGE
$ fedn COMMAND
...
Commands
fedn build
✅ 测试环境一键发布脚本,支持lerna
USAGE
$ fedn build
OPTIONS
-h, --help show CLI help
--copy 是否是纯拷贝
--env=env 打包的环境配置
--lerna=lerna lerna项目下的子项目名称
--nobuild 是否跳过构建,如果不需要,确保目录下有打包文件夹
--output=output [default: dist] 打包后的输出文件名称
--project=project 打包的项目名称
--type=type 打包的项目类型
EXAMPLES
1️⃣ 常规项目使用:
📌fedn build
2️⃣ 不需要加入构建:
📌fedn build --nobuild
2️⃣ 纯拷贝把文件拷贝到path目录:
📌fedn build --copy
3️⃣ 构建文件输出目录不是dist 如果是custom:
📌fedn build --output=custom
4️⃣ lerna 下的发布,指定需要打包的lerna项目:
📌fedn build --lerna=backstage
5️⃣ 传入需要构建的环境:
📌fedn build --env=demo
📌npm run build demo
6️⃣ 传入需要构建的项目:fedn build --project=ayes
📌npm run build ayes
7️⃣ 传入需要构建的类型 fedn build --type=ayes
📌npm run build:ayes
8️⃣ 传入需要构建的环境和项目 fedn build --env=test --project=fah
📌npm run build test fah
9️⃣ 举个完整的例子
📌==> fedn build --type=app --env=test --project=fah --lerna=backstage --nobuild --output=custom
==> 第一步: 因为有--lerna 先进入到 当前运行fedn的目录/packages/backstage
==> 第二步: 因为有--nobuild,不会执行build命令,反之则执行命令 npm run build:app test fah
==> 第三步: 因为有--output,执行完命令后,找到名称为--output文件,如果没有默认是dist,开始上传
See code: src/commands/build.ts
fedn help [COMMAND]
display help for fedn
USAGE
$ fedn help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
fedn key
🔑 添加私钥到配置文件,推荐使用--path,指定路径,--value没测试过
USAGE
$ fedn key
OPTIONS
-h, --help show CLI help
--path=path 私钥路径
--show 查看私钥
--value=value 私钥内容
EXAMPLES
mac添加配置路径: fedn key --path=/Users/Radish/.ssh/id_diannei_rsa
windows添加配置路径: fedn key --path=C:\Users\Radish\.ssh\id_diannei_rsa
添加私钥内容: fedn key --value=xxx
查看添加的私钥:fedn key --show
See code: src/commands/key.ts
fedn upload
❌ 上传文件到服务器:功能开发中
USAGE
$ fedn upload
See code: src/commands/upload.ts