Name: oss-syncer
Owner: node_modules
Description: synchronization all files from this bucket to another bucket
Created: 2015-07-15 09:09:21.0
Updated: 2018-05-25 08:03:03.0
Pushed: 2018-05-25 08:03:02.0
Homepage: null
Size: 17
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
????? oss bucket?
m install oss-syncer
strict'
t co = require('co')
t syncer = require('oss-syncer')
ee https://github.com/ali-sdk/ali-oss
t sourceConfig = {}
t targetConfig = {}
t options = {
urcePrefix: 'release/',
rgetPrefix: 'prepub/',
rce: true, // ??? true?? true ????????? source ?? target?? false ????
nore: false, // ??? false?? true ??????????????????????????????
epHeaders: ['cache-control'], // ????? oss header???????????????????
yncer.sync(sourceConfig, targetConfig, options)).catch(err => console.error(err.stack))
????????????? DEBUG=oss-syncer
???????
oss-syncer
?????? walk
????????? oss bucket ?????????
strict'
t syncer = require('oss-syncer')
t co = require('co')
t oss = require('ali-oss')
t config = require('./config')
t source = oss(config.source)
unction * () {
t num = 0
eld syncer.walk(source, '', function *(meta) {
num++
nsole.log('total nums: %s', num)
ch(err => console.error(err.stack))
MIT