Having trouble understanding gulp (I'm new).
I want to automate a product build which involves cloning from a gitlab repo.
I don't understand why I need src('package.json')
there, is this some kind of a trick? I also don't get why I get notified when task starts and not at the end!
var gulp = require('gulp');
var git = require('gulp-git-streamed');
var notify = require('gulp-notify');
gulp.task('clone', function() {
return gulp
.src('package.json') // wth is this?
.pipe(git.clone('https://gitlab.somedomain.com/mockups/theme.git', {args: './src/gitlab/mockups'}))
.pipe(notify('psd repo cloned!')); // why does this run before cloning is finished?
});
What happens is:
[13:16:34] gulp-notify: [Gulp notification] psd repo cloned!
[13:20:23] Cloning into './src/gitlab/mockups'...
Checking out files: 100% (18/18), done.
Any thoughts?