Run "rsync -aC --exclude-from=.rsyncignore".
$ npm install --save-dev rsync-ac
Of course, you need to install rsync
.
module.exports = function (grunt) {
grunt.initConfig({
rsync: {
options: {
local: './build/',
remote: 'user@example.com:~/Sites/example.com/'
},
main: {
options: {
dry_run: false,
sync; true,
progress: true
}
}
}
});
};
grunt.loadNpmTasks('grunt-rsync-ac');
Task name is rsync
, not rsync-ac
or rsync_ac
. There is no need to
configure src-dest mappings. This Grunt plugin just run rsync
.
You can specify exclude patterns in .rsyncignore
file. .rsyncignore
file
must be placed in the same directory as a Gruntfile.js
file. You can also
specify exclude patterns with:
-
~/.cvsignore
file - A file set
$CVSIGNORE
-
.cvsignore
file in the same directory as aGruntfile.js
Optional: default value is './'
A path to source directory. This plugin does not normalizes this value, so be careful to set. This can be pointed to remote directory.
Required: default value is undefined
A path to destination directory. This can be pointed to local directory.
Optional: default value is true
Enable --dry_run
option or not. If this option sets to true
, no changes made
to a remote directories.
Optional: default value is false
Enable --delete
option or not. If this option sets to true
, an extraneous
files will be deleted from destination directories.
Optional: default value is false
Enable --progress
option or not. If this option sets to true
, a progress
will be displayed during file transfer.