Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mazeyqian/aliyunoss-cli
Aliyun OSS CLI/阿里云 OSS CLI
https://github.com/mazeyqian/aliyunoss-cli
aliyun aliyun-oss cli upload
Last synced: 12 days ago
JSON representation
Aliyun OSS CLI/阿里云 OSS CLI
- Host: GitHub
- URL: https://github.com/mazeyqian/aliyunoss-cli
- Owner: mazeyqian
- License: mit
- Created: 2017-08-26T10:20:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-19T00:09:27.000Z (over 1 year ago)
- Last Synced: 2023-09-19T04:54:32.168Z (over 1 year ago)
- Topics: aliyun, aliyun-oss, cli, upload
- Language: JavaScript
- Homepage:
- Size: 226 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Aliyunoss CLI
[![NPM version][npm-image]][npm-url]
[![l][l-image]][l-url][npm-image]: https://img.shields.io/npm/v/aliyunoss-cli
[npm-url]: https://npmjs.org/package/aliyunoss-cli
[l-image]: https://img.shields.io/npm/l/aliyunoss-cli
[l-url]: https://github.com/mazeyqian/aliyunoss-cli阿里云 OSS 文件上传 CLI。
## Install
You can get aliyunoss-cli via [npm](http://npmjs.com).
```
npm install aliyunoss-cli --save-dev
```## Usage
创建配置文件 `alioss.config.json`:
```
{
"region": "-",
"accessKeyId": "-",
"accessKeySecret": "-",
"bucket": "-",
"releaseEnvConf": {
"dev": {
"source": "dist/",
"target": "home/dev/"
},
"pre": {
"source": "dist/",
"target": "home/pre/"
},
"prd": {
"source": "dist/",
"target": "home/prd/"
}
}
}
```运行:
```
# 测试
npx aliyunoss-cli --releaseEnv dev
# 预发布
npx aliyunoss-cli --releaseEnv pre
# 生产
npx aliyunoss-cli --releaseEnv prd
```更多命令 `npx aliyunoss-cli --help`:
```
Usage: aliyunoss-cli [options]
--help 查看帮助
--version 查看版本
--config 配置文件路径 默认: ./alioss.config.json
--releaseEnv 发布环境 例如: dev pre prd
--source 本地静态文件路径 例如: dist/
--target 阿里云 OSS 文件路径 例如: static/home/
--accessKeyId 阿里云 OSS accessKeyId
--accessKeySecret 阿里云 OSS accessKeySecret
--bucket 阿里云 OSS bucket
--region 阿里云 OSS region
```## thx
[Jeremy Liang](https://github.com/whoopschat)