【问题标题】:Gulp-git clone in specific folder location. Cloned to 'undefined' folderGulp-git 克隆到特定文件夹位置。克隆到“未定义”文件夹
【发布时间】:2014-08-22 07:07:24
【问题描述】:

如何克隆并放置在特定位置?

 var git = require('gulp-git'); 
// Clone a remote repo
 gulp.task('clone', function(){
 git.clone('https://git-location', './apps/');
});

我一直在查看文档,但找不到任何文档。

下面是运行任务后的输出

[11:17:05] Starting 'clone'...
[11:17:05] Finished 'clone' after 5.76 ms
[11:17:48]  Cloning into 'undefined'...

当我运行任务时,它会将文件复制到 undefined 文件夹中。显然,我做错了什么。谁能给我指出来?

【问题讨论】:

  • 附加信息:我正在寻找的最终结果是将 git 复制到应用程序文件夹。

标签: git gulp


【解决方案1】:

感谢 S.Lacey(gulp-git 的发布者之一)及时回复我的问题。下面是正确的格式。

git.clone("https://git-location",{cwd: "./apps/"});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-08-14
    • 2010-10-13
    • 2012-11-08
    • 2021-01-17
    • 2011-11-01
    • 1970-01-01
    相关资源
    最近更新 更多