前端自动化工具:Grunt使用教程

1、下载node.js,然后将node.exe文件所在的目录加入path环境变量

2、安装npm管理工具

  2.1、下载npm源码,解压到npm文件夹里,不要把npm放在和node.exe相同的文件夹

  2.2、使用命令  node cli.js install -gf 安装npm

      或者命令 

      node cli.js install npm -gf //可以安装最新版的NPM
      node cli.js install npm@1.0.105 -gf //可以安装指定版本的NPM

  2.3、npm安装完成后,将"D: pm ode_modules"加入系统环境变量NODE_PATH中。

3、安装grunt命令行grunt-cli ,安装命令 npm install -g grunt-cli

4、grunt实际应用

算了,好像gulp更好用。
原文地址:https://www.cnblogs.com/yanyd/p/4666944.html