In the company to access the network has restrictions, even their own website can not do, the release of WordPress is blocked, empty again to do, so first publish the article to csdn above 1, the purpose
Automate multiple font files for Base64 encoding 2, step
Download installation package from Nodejs official website, Windows is a fool type, after installation should be NPM (Nodejs package Manage) Nodejs package management tools, DOS command check whether the installation was successful.
NODE-V//Show node version
npm-v//Show NPM package management tools
Install the Grunt build tool, and then go to the project installation after global installation grunt
NPM install-g grunt-cli
npm install-g Grunt
3, the problem
Enter the project directory to view the installation of grunt
Here's the problem, dos command feedback.
"Grunt" is not an internal or external command and is not a running program or a batch file. 4, the problem investigation
View the node's installation root directory
NPM root-g
Running Grunt-version or not.
Find a lot on the internet, give a few of the correct solution, so their own groping, and finally determined the environment variable solution.
This kind of problem can be solved, such as:
"Gulp" is not an internal or external command and is not a running program or a batch file. 5. Steps for Solution
My system department Windows7, oneself refer to solve OH.
1, Desktop-> computer-> Properties-> advanced system Settings-> advanced-> environment variables
2, the above user variable, new-> variable name:node_path -> variable value:C:\USER\Administrator\AppData\Roaming\npm\node_modules -> OK
Note: Here the administrator is determined to be its own username or Nodejs installation root directory, do not know the command,npm root-g, view, and to point to node_modules under the line
3, the new boot DOS, into the project to see if Grunt can be used 6, base64 code
There are a lot of coding files on the web, for reference,
NPM Install Grunt-base64
Don't know how to get into the directory run
NPM Install
Modify the Gruntfile.js parameter configuration, and then run the grunt