An open API service indexing awesome lists of open source software.

https://github.com/tomieric/qn-file-sync

Folder file sync to Qiniu,文件同步到七牛,支持目录同步
https://github.com/tomieric/qn-file-sync

Last synced: 10 days ago
JSON representation

Folder file sync to Qiniu,文件同步到七牛,支持目录同步

Awesome Lists containing this project

README

        

# qn-file-sync

> File sync to Qiniu

[DOC](./doc/README.MD)

### INSTALL

```
npm i -D @tomieric/qn-file-sync
```

In your package file, add scripts like this:

```
{
"scripts": {
"qn": "qn-file-sync -c qiniu.js -d ./dist"
}
}
```

Open the commandLine,type and execute it.

```
$ npm run qn
```

### npx

```
$ npx @tomieric/qn-file-sync -c qiniu.js -d ./dist

# or
# default config file is `package.json`
$ npx @tomieric/qn-file-sync -d ./dist
```

## API

```
const qnFileSync = require('@tomieric/qn-file-sync')

/**
* qnFileSync(options)
*/
qnFileSync({
# sync folder
root: './svn/www',
accessKey: 'your access key',
secretKey: 'your secret key',
bucket: 'your bucket name',
origin: 'http://{bucket}.u.qiniudn.com',
uploadURL: 'http://up-z2.qiniup.com/'
}).then(files => {})
```

### options
* `root` sync file
* `accessKey`
* `secretKey`
* `bucket`
* `origin`
* `uploadURL`

## Devlopmenet

```
npm test
```

#
(c) MIT LICENSE