Skip to content

xjq7/aliyun-oss-static-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1. 安装

yarn add aliyun-oss-static-deploy
or
npm install aliyun-oss-static-deploy

2. 使用

const deploy = require('aliyun-oss-static-deploy')

deploy({
  ossConfig: {
    region: 'your region', //oss地区名
    accessKeyId: 'your accessKeyId',
    accessKeySecret: 'your accessKeySecret',
    bucket: 'your bucket',
  },
  //  最好同时配置staticPath,ossPath,确定上传文件路径以及存储路径
  staticPath: 'your staticPath', // 默认为根路径
  ossPath: 'your ossPath', // oss存储路径,默认是根路径,
  recursion: true, // 递归上传,默认为true,文件夹下所有文件递归上传
})

About

阿里云oss本地文件上传组件,适用于静态资源部署阿里云的项目

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published