}
Please note that this guide requires SSH access and experience. If you have SSH access and you feel comfortable using the command line please follow the instructions below. Otherwise, feel free to open a support ticket and one of our System Administrators will install it for you.
1) Install Grunt via NPM from your HOME directory:
user@hostname: ~ $ npm install grunt grunt-cli
Once you execute the command all packages will be downloaded and installed locally in your account under the folder node_modules
2) You can now search for "grunt" binary:
user@hostname: ~ $ find ./node_modules/ -name "grunt"
./node_modules/grunt
./node_modules/grunt/lib/grunt
./node_modules/grunt-cli/bin/grunt
./node_modules/load-grunt-config/grunt
./node_modules/.bin/grunt
3) We are interested on the binary, let's check the version to make sure it works:
user@hostname: ~ $ ./node_modules/grunt-cli/bin/grunt -V
grunt-cli v1.2.0
grunt v0.4.5
4) In order to avoid typing the whole path each time we need to use "grunt" we can add an alias on our file .bashrc
user@hostname: ~ $ echo 'alias grunt="~/node_modules/grunt-cli/bin/grunt"' >> ~/.bashrc
5) "source" the file to apply changes:
user@hostname: ~ $ source ~/.bashrc
6) Let's verify that the alias works:
user@hostname: ~ $ grunt -V
grunt-cli v1.2.0
grunt v0.4.5
That's all! You can now use Grunt to execute your tasks!
Powered by WHMCompleteSolution