aliyunoss-cli
v1.1.4
Published
Alibaba Cloud OSS file upload CLI.
Downloads
13
Readme
Aliyunoss CLI
阿里云 OSS 文件上传 CLI。
Install
You can get aliyunoss-cli via npm.
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