# rollup-plugin-asset-sync

> Asset files synchronization for rollup

Latest version **0.0.7** (published 2018-08-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install rollup-plugin-asset-sync
pnpm add rollup-plugin-asset-sync
yarn add rollup-plugin-asset-sync
bun add rollup-plugin-asset-sync
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2018-08-31 |
| First published | 2018-08-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Malte Rosenbjerg |
| Maintainers | mrosenbjerg |
| Keywords | rollup-plugin, asset, sync, copy |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-asset-sync
- Repository: https://github.com/rosenbjerg/rollup-plugin-asset-sync
- Issues: https://github.com/rosenbjerg/rollup-plugin-asset-sync/issues
- npm.io page: https://npm.io/package/rollup-plugin-asset-sync

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.0.7 (latest) — 2018-08-31
- 0.0.6 — 2018-08-22
- 0.0.5 — 2018-08-21
- 0.0.4 — 2018-08-19
- 0.0.3 — 2018-08-19
- 0.0.2 — 2018-08-09
- 0.0.1 — 2018-08-09

## README

### rollup-plugin-asset-sync
##### Plugin for rollup that adds asset synchronization.

The plugin copies all files found in the input directory into the output directory.
Files are only overwritten if the last modified time of the two files are different.
Files in the output directory are deleted when they are deleted in the input directory.

The aim is to keep the content of the output directory synced with the input directory, without unnecessary writes.


Requires an options object that specifies the path to the input asset folder and the path of the output asset folder.

Example use in `rollup.config.js`:

```
import assetSync from 'rollup-plugin-asset-sync';

export default {
    input: entry,
    output: {
        file: 'dist/bundle.js',
        format: 'iife',
        sourcemap: true
    },
    plugins: [
        assetSync({
            input: 'src/assets',
            output: 'dist/assets'
        })
    ]
}
```

Use the option `verbose: true` to enable console logging file actions

Tested on Node.js v. 10.8.0 and Rollup v. 0.62.0

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