# @umm/script-sync

> Synchronize files like rsync uses glob.

Latest version **1.0.0** (published 2018-04-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @umm/script-sync
pnpm add @umm/script-sync
yarn add @umm/script-sync
bun add @umm/script-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.0 |
| Published | 2018-04-12 |
| First published | 2018-04-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 13 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tetsuya Mori |
| Maintainers | fakestarbaby, hanage, kidsstar_system, mkaya, monry, risacankidsstar, takyama |

## Links

- npm: https://www.npmjs.com/package/@umm/script-sync
- Repository: https://github.com/umm-projects/script-sync
- Homepage: https://github.com/umm-projects/script-sync#readme
- Issues: https://github.com/umm-projects/script-sync/issues
- npm.io page: https://npm.io/package/@umm/script-sync

## Dependencies (3)

- [glob](https://npm.io/package/glob.md) ^7.1.2
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [rimraf](https://npm.io/package/rimraf.md) ^2.6.2

## Recent versions

- 1.0.0 (latest) — 2018-04-12

## README

[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
[![CircleCI](https://circleci.com/gh/umm-projects/script-sync/tree/master.svg?style=svg)](https://circleci.com/gh/umm-projects/script-sync/tree/master)

# sync

Synchronize some files and directories like `rsync`.

## Usage

```nodejs
let sync = require('sync');

sync("path/to/source", "path/to/destination"); // returns Promise object
```

## Signature

`sync(<Source Path>, <Destination Path>, [<Patterns>])`

### Source Path

* Copy source path

### Destination Path

* Copy destination path

### Patterns

* Designation patterns as array of string or object.

#### String

* Designation patterns as glob.

#### Object

* Designation detail of the pattern.

| Key | Description | Default |
| --- | --- | --- |
| pattern | Designation patterns as glob. | - |
| overwrite | Overwrite files if already exists. | true |
| removeSource | Remove source files when finish copy. | false |
| removeEmptyDirectory | Remove empty directory in source path after finish processing `removeSource`. | false |
| removeDeletedFiles | Remove files that do not exist on the source path. | false |

# License

Copyright (c) 2018 Tetsuya Mori

Released under the MIT license, see [LICENSE.txt](LICENSE.txt)

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