grunt-multisync
syncing multiple folder pairs across drives/locations
Getting Started
This plugin requires Grunt ~0.4.1
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-multisync --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
The "multisync" task
Overview
In your project's Gruntfile, add a section named multisync
to the data object passed into grunt.initConfig()
.
grunt
Drives
Drive is a list of drives (or folders) that you want to copy files from or to. In the example config we have two drives configured, a local hard drive 'MyHardDrive' and a backup hard drive MyBackupDrive. In the next section where you configure a sync 'job' you can reference these drives like this.
You can specify a "~" if you want to start in the current working directory of your plugin
grunt
Folders
Because multisync consumes the grunt-rsync plugin which uses rsyncwrapper, it exposes all of the options that are available in rsyncwrapper.
grunt-multisync grunt-rsync rsyncwrapper
Please see the rsyncwrapper plugin documentation for more info at https://github.com/jedrichards/rsyncwrapper/
Options
Options are globally copied into all of the folder pairs. When an option is already set in an individual folder pair the global option is ignored.
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Release History
V1.0.0 is coming today :)