Closed caneta closed 8 years ago
please return
your gulp stream!
return gulp.src(..).pipe(...)
I've written it in ES2015...this:
gulp.task('deploy:bootstrap', () =>
gulp.src(['./dist/bootstrap-2.3.2/'])
.pipe(gulpSSH.dest('/home/user/dest/'))
);
is equivalent to what you suggest:
gulp.task('deploy:bootstrap', function(){
return gulp.src(['./dist/bootstrap-2.3.2/'])
.pipe(gulpSSH.dest('/home/user/dest/'));
}
);
But with the return statement I get the same result:
user@host:$ gulp deploy:bootstrap
[11:47:29] Using gulpfile /home/user/project/gulpfile.js
[11:47:29] Starting 'deploy:bootstrap'...
[11:47:29] "/home/user/project/dist/bootstrap-2.3.2" has no content. Skipping.
[11:47:29] Finished 'deploy:bootstrap' after 22 ms
I have another task written in ES2015, moving some CSS and this one works perfectly:
gulp.task('deploy:css', ['dist:css'], () =>
gulp.src(['./dist/css/*.css'])
.pipe(gulpSSH.dest('/home/user/dest/css/'))
);
So what is missing?
use gulp.src('./dist/bootstrap-2.3.2/**')
Ok, now it works! The complete working task is the following one:
gulp.task('deploy:bootstrap', () =>
gulp.src(['./dist/bootstrap-2.3.2/**'])
.pipe(gulpSSH.dest('/home/user/dest/bootstrap-2.3.2'))
);
Thak you so much!
Hi. I'm tryingo to copy a local folder to a remote server with the following syntax:
But I get the following:
My folder structure is:
Why it is treated as it were empty?
Thank you.