Reputation: 14034
I'm trying to write a gulp task that'll copy all the files from the development folder into an apache folder.
// Copies current file to the local www folder
gulp.task('copy', function(){
return gulp.src('**/*')
.pipe(gulp.dest('~/Sites/foldername'));
});
But gulp creates a ~
folder in the current directory and ends up copying the files to ./~/Sites/foldername
.
How do I make gulp treat my path as an absolute path rather than a relative path?
Upvotes: 2
Views: 1052
Reputation: 1698
Gulp (or node) is not able to resolve ~
, hardcode the full home path or use a utility function that gets you the home path for current user.
Upvotes: 2