我使用gulp-git克隆了一个类似WordPress的大型仓库(185MB的源代码,包括.git的230MB)。
终端显示如下:
$ gulp cloneWP [15:24:49] Working directory changed to ~/project [15:24:49] Using gulpfile ~/project/gulpfile.js [15:24:49] Starting 'cloneWP'...
这是我的cloneWP任务
gulp.task('cloneWP', function(done) { return git.clone('https://github.com/WordPress/WordPress.git', {args: distDir + 'WordPress', quiet: false}, function(err) { if(err) console.log(err); done(); }); });
克隆源代码需要花费一些时间,并且克隆时没有像使用git clone那样显示过程。
如何监视下面的情况?
$ git clone https://github.com/WordPress/WordPress.git Cloning into 'WordPress'... remote: Enumerating objects: 154, done. remote: Counting objects: 100% (154/154), done. remote: Compressing objects: 100% (97/97), done. remote: Total 282507 (delta 113), reused 86 (delta 57), pack-reused 282353 Receiving objects: 100% (282507/282507), 183.38 MiB | 484.00 KiB/s, done. Resolving deltas: 100% (225317/225317), done.