1.0.26 • Published 2 years ago

@lugia/cli-package v1.0.26

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

安装

npm i -g @lugia/cli-package

参数说明

  -V, --version                   output the version number
  -p, --path <String>             指定进行扫描安装的目录
  -t, --type <String>             指定操作类型:
          update            进行依赖更新
          find              进行依赖检索
          add               依赖不存在时,自动添加最新依赖
          yarn              找到目录执行yarn操作
          rm                清空node_modules文件夹
          download          根据参数进行项目clone代码, 可指定安装npm依赖.
          pull              根据查到的npm项目进行代码拉取操作
          build             根据查到的npm项目进行项目构建操作
          replaceWidget     根据查到的mega项目进行lugiad页面的组件替换处理
          mergeProps        根据找到的mega项目进行lugiad页面的属性合并处理

  -m, --modules <String[]>        指定需要进行更新的模块,多个用逗号[,]隔开
  -r, --registry <String>         指定用于扫描的源
  -git, --gitHost <String>        git地址的前缀
  -u, --userName <String>         git用户名
  -pwd, --password <String>       git密码
  -hs, --host <String>            ssh地址
  -rdir, --remoteDir <String>     上传的远程根目录
  --force                         强制切换代码到最新到分支,上传部署文件时将会强制删除已存在的目录文件。请慎用避免误删操作
  -i, --install                   下载代码后是否进行yarn install操作,默认为:false
  -l, --projectList <String[]>    要下载的项目名称列表,多个用逗号[,]隔开
  -b --branch <String>            指定要下载代码的git分支,默认为: dev
  -mn, --moduleName <String>      指定查找替换的组件库名称
  -w, --widgetName <String>       指定查找替换的组件名称
  -nmn, --newModuleName <String>  替换为新的模块名称
  -nw, --newWidgetName <String>   替换为新的组件名称
  -nv, --newVersion <String>      替换为新的组件库版本
  -z, --zip                       是否进行压缩处理,默认不进行压缩
  --uglify                        是否进行压缩处理,默认不进行压缩
  --dev                           添加模块时是否添加到devDependencies上,默认为false
  --onlyAdd                       更新模块时、添加模块时仅进行package.json的更新处理
  -mp, --mergeProps  <JSON>       指定要合并到组件的属性JSON信息
  -h, --help                      display help for command

模块处理对应目录必须有 package.json 文件

添加依赖

lugia-cli -t add -p  "/test/*" -m @ysstech-data/ssf-fida-bussiness@beta -r http://192.168.102.79/verdaccio

更新项目依赖

lugia-cli -t update -p  "/test/*" -m @lugia/lugia-web@beta,@ysstech-data/data-web@beta,@ysstech-data/data-web-bussiness@beta,@ysstech-data/ssf-fida-bussiness@beta -r http://192.168.102.79/verdaccio

查找依赖

lugia-cli -t find -p  "/test/*" -m @ysstech-data/ssf-fida-bussiness@beta -r http://192.168.102.79/verdaccio

执行 yarn 操作

lugia-cli -t yarn -p "/test/*" -r http://192.168.102.79/verdaccio

[

执行 清空 node-modules 操作

lugia-cli -t rm -p "/test/*"

删除所有 test 下子目录的 node-modules 目录。

下载代码操作

lugia-cli -p /test -l  ssf-fida-classifiedAssetAnalysis -t download -git http://localhost:3000/product-code/web -u liguoxin -pwd 123456
# 下载并进行yarn install
lugia-cli -p /test -l  ssf-fida-classifiedAssetAnalysis -t download -git http://localhost:3000/product-code/web -u liguoxin -pwd 123456 -i

pull 代码操作

lugia-cli -p /test  -t pull -b dev --force

lugiad 页面的组件替换

lugia-cli -p "./*"  -t replaceWidget -mn @ysstech-data/ssf-fida-bussiness -w contentLayout -nmn @ysstech-data/ssf-fida-bussine -nw ContentLayout

lugiad 页面的组件属性合并

lugia-cli -p "./*"  -t mergeProps -mn @ysstech-data/ssf-fida-bussiness -w contentLayout -nmn @ysstech-data/ssf-fida-bussine -nw ContentLayout

项目构建

lugia-cli -p "./*"  -t build

项目构建进后生成压缩包

lugia-cli -p "./*"  -t build --zip

项目构建后进行 uglify-js 处理

lugia-cli -p "./*"  -t build --uglify

项目构建后进行上传处理

lugia-cli -p "./*"  -t build --uglify -u root -pwd 123456 --host 127.0.0.1 --remoteDir /home/work

上传规则为将打包后的文件上传到 ${remoteDir}/${deployPath}目录上。

PS: deployPath 读取自 package.json 的配置,如若读取不到则使用 name 作为该目录.

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago