0.2.5 • Published 2 years ago
oss-deploy v0.2.5
oss-deploy
自动部署前端项目到 oss
使用
npm i oss-deploy -D在 package.json 中添加命令
{
"scripts": {
"pub": "oss-deploy"
}
}配置
- 配置文件默认在项目根目录下
- 配置文件默认为
oss-deploy.config.json - 配置文件可以添加环境,如
oss-deploy.config.dev.json
在项目根目录下创建 oss-deploy.config.json 文件
{
"domain": "https://demo.com",
"accessKeyId": "xxxxx",
"accessKeySecret": "xxx",
"bucket": "bucket-name",
"region": "oss-cn-beijing",
"build": "npm run build"
}配置项
domain自定义域名可为空accessKeyId阿里云 accessKeyIdaccessKeySecret阿里云 accessKeySecretbucket阿里云 bucketregion阿里云 regionbuild打包命令 默认为npm run builddist打包目录 默认为distbarkApibark 推送地址refreshFilePath刷新文件路径 默认为./refresh.txt