hughsk/s3-sync — pull request #2 by christophercliff (2013-07-21 21:36:43+00:00)
Title: Keep a remote copy of the cache db saved on S3

This is not quite working yet--there is a problem in the `getCache` callback where the stream events aren't being triggered. Suggested usage like:

```js
var s3sync = require('./index.js')
var readdirp = require('readdirp')

var syncer = s3sync({
key: YOUR_KEY,
secret: YOUR_SECRET,
bucket: YOUR_BUCKET
})
var files = readdirp({
root: __dirname + '/build'
})

syncer.getCache(function(err){
files.pipe(syncer)
.on('data', function(file){ console.log(file.fullPath + ' -> ' + file.url) })
.once('end', function(){
syncer.putCache(function(){
console.log('Done!')
})
})
})
```

Also added `level` as a dependency--I think that would be the typical usage, no?

Fixes issue #1