Reputation: 783
I probably missed something here. I'm using Node 0.10.1 on Win7/64bit and installed grunt 0.4.1 with
npm install grunt
npm install -g grunt-cli
npm install -g grunt-init
Then I tried to install a template while in folder %USERPROFILE%
git clone [email protected]:gruntjs/grunt-init-gruntfile.git ~/.grunt-init/gruntfile
But git wants a passphrase for key [current folder]. So I just created a folder
%USERPROFILE%\.grunt-init\gruntfile\
and copied https://raw.github.com/gruntjs/grunt-init-gruntfile/master/template.js to it. Now I switched to the project folder and was able to start grunt-init with
grunt-init gruntfile
Process ends with "Done, without errors", but no file ist created, or at least I can't find it.
Upvotes: 0
Views: 2009
Reputation: 625
I think you are have few a different issues here - from your comments it looks like you are using a Windows.
The first issue is that you can't clone the repository. Having tried this myself, I found the problem was fixed by setting up a valid ssh key on my github account. So to clone this repository you need to create a github account and install ssh keys on both your machine and your github account. Github's documentation on how to do this is very good and can be found here for Windows https://help.github.com/articles/set-up-git#platform-windows.
The second issue is that the git clone
command you are using won't work on a Windows machine as it supplies a path to a Linux home directory ~/.grunt-init/gruntfile
.
From your comments I am guessing the %USERPROFILE%.grunt-init\gruntfile\
is the correct install directory for Windows and so changing your working directory to that and using the command git clone [email protected]:gruntjs/grunt-init-gruntfile.git
should install it.
You may also consider working using Cygwin which allows you to use a linux working environment on a windows machine.
Happy node hacking.
Upvotes: 0
Reputation: 14434
dont know how to clone into your userhome on windows, but IMPORTANT(!) you also need to copy the whole "root" directory ( https://raw.github.com/gruntjs/grunt-init-gruntfile/master/root) to '%USERPROFILE%.grunt-init\gruntfile\'
you know that this init-template will just create a gruntfile.js for you? (inside the root-directory you can see that). if you want to create a node-module, jquery-plugin and so on, use one of the other templates (grunt-init-node, grunt-init-jquery) and so on.
creating your own template is easy. just create a new folder in '%USERPROFILE%.grunt-init' with your template-name. add the template.js. add a root-directory where all the files are which you want to be copied, maybe add a rename.json (for folder and file-renamings) and maybe change some stuff in the template.js.
Upvotes: 1