Getting grunt to work with Cygwin and git on Windows is a bit difficult considering the cygwin package that is installed by git has an outdated version of node running on it. There are several issues to work through:
- Cygwin by default installs an old version of node.
- Open Cygwin shell
which node
tells you where the executable isnode --version
tells you if it's oldcd
to the directory listed bywhich node
mv node.exe node.exe.bak
- download node from nodejs.org and install it
- Node installed through installer doesn't update PATH to point to correct version of node installed normally.
- on my system it was in Application data and program files, YMMV, so I added those to my path
- to see current path:
echo $PATH
- to set path:
export PATH="your path here"
- i added
/c/Documents and Settings/mike/Application Data/npm:/c/Program Files/nodejs:
to my path - grunt needs to be installed globally and locally
cd
to your jquery top level directorynpm install
will install local grunt and grunt-compare-sizenpm install -g grunt
will install the global grunt that is recognized as in the PATH
that should be it, at least that's what worked for me