Install Grunt on Mac, and install grunt on mac
Step 1: Install brew
Go to http://bremongosh/ brewhome and install the command.
Step 2: Install node
After the installation is successful, enter brew install node in the command line.
Step 3: Install grunt
After the installation is complete, enter npm install-g grunt-cli in the command line.
Step 4: Install the grunt plug-in
Put the prepared Gruntfile. js and package. json in the directory of the project to be executed;
Enter cd + space, drag the project folder into the command line, and enter to execute;
Enter npm install in the command line and wait until the installation is complete.
The above four steps are completed.
If sass is used in grunt, you also need to install sass
Mac comes with ruby, So enter sudo gem install-n/usr/loca/bin sass directly in the command line
After the installation is successful, grunt's sass plug-in can run normally
For gruntfile. js and package. json files, click the following blog:
Http://www.cnblogs.com/wangfupeng1988/p/4561993.html