Skip to content

Instantly share code, notes, and snippets.

@nathanlong
Last active June 15, 2017 06:10
Show Gist options
  • Select an option

  • Save nathanlong/235bc94e2effa1688a9f3f63c1b6bb37 to your computer and use it in GitHub Desktop.

Select an option

Save nathanlong/235bc94e2effa1688a9f3f63c1b6bb37 to your computer and use it in GitHub Desktop.

Revisions

  1. nathanlong revised this gist Nov 22, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gulpfile.js
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ gulp.task('deploy', function(){
    emptyDirectories: true,
    recursive: true,
    clean: true,
    exclude: ['node_modules'],
    exclude: ['node_modules', '.svn', '.git'],
    hostname: '', // hostname
    username: '', // ssh username
    destination: 'rsynctest02', // path where uploaded files go
  2. nathanlong revised this gist Nov 22, 2016. 1 changed file with 2 additions and 10 deletions.
    12 changes: 2 additions & 10 deletions gulpfile.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,5 @@
    var gulp = require('gulp');
    var changed = require('gulp-changed');
    var rsync = require('gulp-rsync');
    var gulp = require('gulp');
    var rsync = require('gulp-rsync');

    gulp.task('deploy', function(){
    // Dirs and Files to sync
    @@ -28,10 +27,3 @@ gulp.task('deploy', function(){
    gulp.task('watch', function(){
    gulp.watch('rsynctest01/**/*', ['deploy']);
    });

    function throwError(taskName, msg) {
    throw new gutil.PluginError({
    plugin: taskName,
    message: msg
    });
    }
  3. nathanlong created this gist Nov 22, 2016.
    37 changes: 37 additions & 0 deletions gulpfile.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    var gulp = require('gulp');
    var changed = require('gulp-changed');
    var rsync = require('gulp-rsync');

    gulp.task('deploy', function(){
    // Dirs and Files to sync
    rsyncPaths = ['rsynctest01' ];

    // Default options for rsync
    rsyncConf = {
    verbose: true,
    incremental: true,
    relative: true,
    emptyDirectories: true,
    recursive: true,
    clean: true,
    exclude: ['node_modules'],
    hostname: '', // hostname
    username: '', // ssh username
    destination: 'rsynctest02', // path where uploaded files go
    };

    // Use gulp-rsync to sync the files
    return gulp.src(rsyncPaths)
    .pipe(rsync(rsyncConf));
    });

    gulp.task('watch', function(){
    gulp.watch('rsynctest01/**/*', ['deploy']);
    });

    function throwError(taskName, msg) {
    throw new gutil.PluginError({
    plugin: taskName,
    message: msg
    });
    }