daizch / ali-oss-put

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@fetools/ali-oss-put

install

$ npm i @fetools/ali-oss-put -D

config

configuration file .aliossputrc

{
    "accessKeyId": "***",
    "accessKeySecret": "***",
    "region": "oss-cn-hangzhou", //more like oss-cn-shenzhen
    "bucket": "static", //your own bucket name
    "prefix": "my/public/", // oss directory path
    "src":"dist", // upload directory
    "ignore": "*.js$" //opt, filter files is not put to oss
    "silent": true //default be true
}

usage

use in package.json

{
  "scripts": {
    "upload": "ali-oss-put"
  }
}

or use in js file

const aliOssPut= require('@fetools/ali-oss-put')

aliOssPut()

About

License:MIT License


Languages

Language:JavaScript 100.0%