I
I
Igor2020-07-29 23:11:23
rsync
Igor, 2020-07-29 23:11:23

Setting up gulp-rsync, how to sync all files in a project?

Hello,
Earlier I set up single folder sync:

function uploadTask() {
  return gulp.src('build/**')
    .pipe(rsync({
      root: 'build/',
      hostname: '[email protected]',
      destination: '/home/blahblah/public_html/wp-content/themes/online/build',
      exclude: ['**/Thumbs.db', '**/*.DS_Store'],
      recursive: true,
      archive: true,
      silent: false,
      compress: true,
      update: true
    }))
}


But how to synchronize all files (even at the gulpfile.js file level)?
I tried like this:
function uploadTask() {
  return gulp.src('/**')
    .pipe(rsync({
      root: '/',
      hostname: '[email protected]',
      destination: '/home/blahblah/public_html/wp-content/themes/online',
    }))
}


function uploadTask() {
  return gulp.src('./**')
    .pipe(rsync({
      root: './',
      hostname: '[email protected]',
      destination: '/home/blahblah/public_html/wp-content/themes/online',
    }))
}

Didn't work, writes that the path is outside the folder

. Is this even possible?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question