P
P
Pavel2016-06-02 18:46:37
gulp.js
Pavel, 2016-06-02 18:46:37

How to do a normal gulp git pull?

Following Ilya Kantor's video tutorials with learn.javascript.js, I started learning gulp.
I created a folder /var/builder/
and installed gulp 4.0, gulp-git and a bunch of other gulp-* packages in it.
Registered export PATH=./node_modules/.binto run gulp from the directory builder
Then I ran the gulp clone task (from gulp-git ), it created a folder with the name of the repository, and after 15 minutes put the contents of the repository there (the repository is large, the Internet is slow).
Question #1
How to keep track of what gulp is doing, because waiting 15 minutes and then getting an error is kind of not very good.

So, I ended up with this path:

/var/builder/myRepoName/ <% файлы репозитория %>

I decided to do a gulp pull but nothing worked. Pull only worked after gulp init, and gulp addremote. But it happened in the same folder as myRepoName, not into it. And this folder didn't come from git. As a result, after another 15 minutes of waiting for gulp pull to work, the entire repository ended up in the folder /var/builder, which is completely unacceptable.
It turned out with the help {args: '--separate-git-dir=./repo/.git'}to make the initialization of the repository in the desired folder /var/builder/repo:
gulp.task('init', function(){
return git.init({args: '--separate-git-dir=./repo/.git'}, function (err) {
  if (err) throw err;
});
});

Но ни addremote, ни pull не получилось никак отправить в новосозданную директорию repo
Вопрос №2
Почему в первом случае при git clone создалась директория /var/builder/myRepoName, а в случае с gulp init , gulp addremote gulp pull - ничего не произошло и никакой myRepoName папки не подтянулось с bitBucket'а?

Вопрос №3
Что мне предпринять? Нужно сделать вполне простую задачу, организовать следующим образом папочки:

var
-- builder
---- myRepoName
------ .git
------ myFile1
------ myFile2
---- node_modules
---- http
------ результат обработки репозитория gulp-minify и прочими gulp-

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