# ronald-tools

> - (如之前有安装可以 先卸载 npm uninstall ronald-tools -g) - npm install ronald-tools -g

Latest version **0.0.1** (published 2023-05-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install ronald-tools
pnpm add ronald-tools
yarn add ronald-tools
bun add ronald-tools
```

Provides the command `rd-cli`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2023-05-29 |
| First published | 2023-05-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 12 |
| Unpacked size | 136.7 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | huangkaicheng |
| Maintainers | ronald_huang |

## Links

- npm: https://www.npmjs.com/package/ronald-tools
- npm.io page: https://npm.io/package/ronald-tools

## Dependencies (12)

- [glob](https://npm.io/package/glob.md) ^7.1.6
- [less](https://npm.io/package/less.md) ^4.1.0
- [axios](https://npm.io/package/axios.md) ^0.20.0
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [tinify](https://npm.io/package/tinify.md) ^1.6.0-beta.2
- [core-js](https://npm.io/package/core-js.md) 3
- [inquirer](https://npm.io/package/inquirer.md) ^7.3.3
- [clean-css](https://npm.io/package/clean-css.md) ^4.2.3
- [commander](https://npm.io/package/commander.md) ^6.0.0
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.11.6
- [command-cli](https://npm.io/package/command-cli.md) 0.0.1
- [miniprogram-ci](https://npm.io/package/miniprogram-ci.md) ^1.6.1

## Recent versions

- 0.0.1 (latest) — 2023-05-29

## README

## ronald-tools web 前端工具箱(类 vue-cli 等)

## 模板生成命令

#### 全局安装

- (如之前有安装可以 先卸载 npm uninstall ronald-tools -g)
- npm install ronald-tools -g

#### 如需下载特定版本 加@1.8.5（版本号）

npm install ronald-tools@1.8.5 -g

```js static
    Usage: main [options] [command]

    Options:
    -V, --version                  output the version number
    -project,--project [name]      build you develop project name
    -token,--apitoken [apitoken]   send your api token
    -author,--author [name]        send your author
    -trigger,--triggerName [name]  send your triggerName
    -branch,--gitBranch [name]     send your gitBranch/tags
    -autotag,--autotag [name]      auto creat your tags
    -host,--host [name]            send your jenkis host
    -file,--file [name]            send your file
    -newfile,--newfile [name]      send your newfile
    -imgMin,--k
    -h, --help                     display help for command

    Commands:
    setup [env]                    run setup commands for all envs
    git-tag [options] [env]        set git tag for all envs
    auto-replace-file [env]        run auto-replace-file for repalce file
    push [options] [env]           run push commands for all envs
    auto-serve [options] [env]     run auto-serve commands for all envs
    create                         run create template file commands
    uploadMini                     run upload miniprogrammer  commands
    imgMin [options]               Compress images by tinypng api
    help [command]                 display help for command

    Examples:
    $ custom-help --help
    $ custom-help -h

   代码执行模块：

    "dev": "rd-cli --project rfhouse-html-dev --gitBranch */dev_branch setup dev",
	"test": "rd-cli  --project rfhouse-html-test-bytag --gitBranch */dev_branch setup test",
    "build": "rd-cli --project rfhouse-html-bytag --branch xx setup build",
    "test:tag": "rd-cli --project rfhouse-html-test-bytag --autotag true setup test",
    "push": "rd-cli push -p true",
    "auto-tag": "rd-cli git-tag",
    "auto-replace": "rd-cli auto-replace-file",
    "auto-serve": "rd-cli auto-serve -p 8007",
    "upload": "rd-cli uploadMini",
    "merge-branch": "rd-cli merge-branch --targetBranch feature/merge  --mainBranch feature/dev",

```

#### 自动生成模板

- rd-cli create 即可运行生成文件交互式命令

#### 模板类型

- vue、小程序 page、小程序 component

#### 预编译 less

- rd-cli less 即可开启监听 也可以 rd-cli less -s wxss/css 可传入想生成的文件后缀


#### 图片压缩

- rd-cli imgMin 可对当前文件下的所有图片文件进行压缩

#### 注意

- 无法使用 git 命令的同学 注意查看配置 git 命令 [http://note.youdao.com/s/SUkvR3kJ](http://note.youdao.com/s/SUkvR3kJ)
- 配置 jenkis 环境项目[http://note.youdao.com/s/Gl79RraM](http://note.youdao.com/s/Gl79RraM)

#### 重要补丁和更新

- 重磅来袭 [哔哩哔哩教学视频来了,伸手党福利](https://www.bilibili.com/video/BV1Sk4y1y7oG/)
- 更新了微信自动发布 去微信小程序管理后台 配置下载 key [参考文档](https://developers.weixin.qq.com/miniprogram/dev/devtools/ci.html)

#### 本地调试

- 使用 npm root -g 找到 NPM 全局包安装位置
- 具体查看当前电脑安装路径（一般 rd-cli 的项目路径为：C:\Program Files\nodejs\node_modules\ronald-tools）
- 修改 ronald-tools 全局包安装位置 然后执行 rd-cli 就是当前开发的命令行

### 发布

本地发布私包前置条件

1.npm config set email ""
2.npm config set always-auth true
3.npm config set \_auth "bnBtX2NvbW1pdG9yOlprSDVvcUlNeW5Rcg=="
4.npm publish --registry=http://192.168.197.95:18081/repository/npm-hosted/

[查看上传的私包](http://192.168.197.95:18081/#browse/browse:npm-hosted) -可以查看上传的私包，install 时，如果配置了 registry 为 npm-group， 会同时从 npm-hosted 和 npm-proxy 中查找

### 发布顺序

1、修改 package.json 版本号
2、执行 yarn publish:rf

---
_Source: https://npm.io/package/ronald-tools · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
