gpt4 book ai didi

npm - 克隆/ check out git 项目的 Grunt 任务

转载 作者:行者123 更新时间:2023-12-04 00:27:40 24 4
gpt4 key购买 nike

我正在开发一个使用 构建的项目咕噜声 .这取决于我想在 npm install 期间克隆/拉取的外部存储库( https://github.com/facebook/xctool )或 grunt mySetupTask .

我见过 grunt-gitco 的踪迹插件在 http://gruntjs.com/plugins/checkout ,但它似乎不可用。

这有什么好的起点吗?

最佳答案

要么设置一个npm postinstall script在你的 package.json 中:

{
"name": "mypackage",
"scripts": {
"postinstall": "git clone git://github.com/facebook/xctool.git"
}
}

或使用 grunt-shell执行命令来克隆 repo:
grunt.initConfig({
shell: {
gitclone: {
command: 'git clone git://github.com/facebook/xctool.git'
}
}
});

关于npm - 克隆/ check out git 项目的 Grunt 任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17481711/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com