I'm working on a project that is built using grunt. It depends on an external repo (https://github.com/facebook/xctool) that I would like to clone/pull during npm install
or grunt mySetupTask
.
I've seen trails of a grunt-gitco
plugin at http://gruntjs.com/plugins/checkout, but it does not seem to be available.
Any good starting point for this?
Either set up a npm postinstall script in your package.json:
{
"name": "mypackage",
"scripts": {
"postinstall": "git clone git://github.com/facebook/xctool.git"
}
}
Or use grunt-shell to execute the command to clone the repo:
grunt.initConfig({
shell: {
gitclone: {
command: 'git clone git://github.com/facebook/xctool.git'
}
}
});
There is now a Grunt plugin for this. Not sure if it was available at the time. I'm still having some issues getting it working.
https://npmjs.org/package/grunt-git
gitclone:
clone:
options:
repository: "https://github.com/imaginethepoet/autojqm"
branch: "master"
directory: "repo"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With