# csl-upload

> 上传脚本

Latest version **1.0.7** (published 2023-06-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install csl-upload
pnpm add csl-upload
yarn add csl-upload
bun add csl-upload
```

Provides the command `csl-upload`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2023-06-11 |
| First published | 2023-06-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | cuishoulong |
| Maintainers | cuishoulong |
| Keywords | 上传, 脚本, upload |

## Links

- npm: https://www.npmjs.com/package/csl-upload
- Repository: https://github.com/aladingmaideng/csl-upload.git#main
- Homepage: https://github.com/aladingmaideng/csl-upload/tree/main#readme
- Issues: https://github.com/aladingmaideng/csl-upload/issues
- npm.io page: https://npm.io/package/csl-upload

## Dependencies (4)

- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [commander](https://npm.io/package/commander.md) ^10.0.1
- [form-data](https://npm.io/package/form-data.md) ^4.0.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.11

## Recent versions

- 1.0.7 (latest) — 2023-06-11
- 1.0.6 — 2023-06-11
- 1.0.5 — 2023-06-09
- 1.0.4 — 2023-06-09
- 1.0.3 — 2023-06-08
- 1.0.2 — 2023-06-08
- 1.0.0 — 2023-06-08

## README

# 上传工具

> + 项目中经常需要本地与测试环境之间传递文件，那么将其简化为npm命令
> + 与server配套使用(上传需要服务端部署一个接收服务)

## 使用

> + 下载包

```js
npm i csl-upload -g
```

> + 上传需要指定地址和路径
> + 可以选择使用配置文件的形式，会默认读取当前执行路径下的upload.config.js

```js
// upload.config.js

module.exports = {
  baseUrl: "", // 上传目录
  path: "", // 被上传目录
  url: "",// 服务地址
};
```

> + 也可以使用行间传参
>   + 行间传参的优先级高于配置文件

```js
// 同上配置文件
csl-upload -u 服务地址 -b 上传目录 -p 被上传目录
```

> + 查看最终配置

```js
csl-upload -d
```

> + 监听目录变化上传
>   + 会默认读取配置中的path配置，进行监听（包含path后代目录）
>   + 为`增量上传`
>     + 如本地删除文件，远程不会删除

```js
csl-upload -w
```

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