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,文件同步到七牛,支持目录同步
- Host: GitHub
- URL: https://github.com/tomieric/qn-file-sync
- Owner: tomieric
- License: mit
- Created: 2018-10-12T03:02:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-10T01:19:47.000Z (almost 6 years ago)
- Last Synced: 2025-04-22T04:14:22.354Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 31.3 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- Changelog: CHANGELOG.MD
- License: LICENSE
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