SyncY
One-way synchronization of directories with glob.
Install
$ npm i -S syncy
Why?
Usage
const syncy = ; ;
API
syncy(patterns, dest, [options])
patterns
- Type:
string|string[]
Glob patterns that represent files to copy
dest
- Type:
string|string[]
Destination directory or directories.
options
- Type:
object
// Display log messages when copying and removing files verbose: false // Or create your own function. verbose: stamp // action - `copy` or `remove` // to - only for `copy` action console; // The base path to be removed from the path. Default: none base: 'base_path' // Remove all files from dest that are not found in src. Default: true updateAndDelete: true // Never remove js files from destination. Default: false ignoreInDest: '**/*.js'
How to work with Gulp?
const gulp = ;const syncy = ; gulp;
How to work with Grunt?
const syncy = ; module { // Default task(s). grunt;};
Tests
Tech specs:
- Intel Core i7-3610QM
- RAM 8GB
- SSD (555MB/S, 530MB/S)
- Windows 10
- Node.js v6.4.0
Files: AngularJS from release v1.6.0-rc.1.
Note: UpdateAndDelete
option is enabled in the grunt-sync, because other plugins have this option initially.
Description of tests | syncy | gulp-directory-sync | grunt-sync |
---|---|---|---|
First run | 3,7s | 9,1s | 10,1s |
Re-run | 0,7s | 1,0s | 0,8s |
Delete single file from dest directory | 0,7s | 0,9s | 0,8s |
Changelog
See the Releases section of our GitHub project for changelogs for each release version.
License
This software is released under the terms of the MIT license.