# gcloud-sync

> Google Cloud Storage synchronisation utility

Latest version **1.0.5** (published 2016-02-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install gcloud-sync
pnpm add gcloud-sync
yarn add gcloud-sync
bun add gcloud-sync
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2016-02-25 |
| First published | 2016-02-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dominic Rose |
| Maintainers | rosedo |

## Links

- npm: https://www.npmjs.com/package/gcloud-sync
- Repository: https://github.com/rosedo/npm-gcloud-sync
- Issues: https://github.com/rosedo/npm-gcloud-sync/issues
- npm.io page: https://npm.io/package/gcloud-sync

## Dependencies (4)

- [async](https://npm.io/package/async.md)
- [gcloud](https://npm.io/package/gcloud.md)
- [lodash](https://npm.io/package/lodash.md)
- [mkdirp](https://npm.io/package/mkdirp.md)

## Recent versions

- 1.0.5 (latest) — 2016-02-25
- 1.0.4 — 2016-02-17
- 1.0.3 — 2016-02-17
- 1.0.2 — 2016-02-16

## README

# Google Cloud Storage synchronisation utility

## Installation
```sh
$ npm install --save gcloud-sync
```

## Usage
```js
const gsync = require('gcloud-sync');

// customizing options up-front
const gsync = require('gcloud-sync')({ parallelLimit: 2 });

// making an instance available to other files
const gsync = require('gcloud-sync');
gsync.custom = gsync({ parallelLimit: 2 });
// freeing memory: delete gsync.custom

// if Promise isn't defined
global.Promise = require('promise-module');
var gsync = require('gcloud-sync');
```

### Synchronizing store data
```js
gsync.execute({

  // MANDATORY FIELDS and example values

  projectId: 'uniqueProjectId',
  keyFilename: __dirname + '/key.json',
  bucket: 'pubsite_prod_rev_<developer-id>',
  prefix: 'stats/installs/installs_',
  outputDirectory: __dirname + '/sync-bucket',

  // OPTIONAL FIELDS and example values

  nameSelector: function(name) {
    return name.indexOf('2016') > -1;
  },

}).then(() => console.log('Done.'))
.catch(console.error);
```

---
_Source: https://npm.io/package/gcloud-sync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
