Grunt-cli and Grunt - Same app, two versions?

你离开我真会死。 提交于 2019-12-03 02:26:34

You're correct, the two projects exist because of different versions of grunt.

grunt-cli is used for grunt version 0.4 (and has an explicit dependency on 0.4), which as of this writing is in alpha development. grunt-0.4 splits the command line interface (grunt-cli) from the API libraries.

The "Getting Started" documentation you found is in the devel branch of the grunt repository, which will be the 0.4 release.

If you're using grunt 0.3.x, then you don't need to install grunt-cli.

As far as I know, grunt-cli is simply a tool to access Grunt from command line anywhere in the system, but it doesn't include Grunt itself. In other words, Grunt-CLI only looks for locally installed Grunt files somewhere in the filesystem, but it doesn't have the functionality of the regular Grunt.

From: http://gruntjs.com/getting-started

Install grunt-cli just will put the grunt command in your system path, allowing it to be run from any directory.

Even more:

...Installing grunt-cli does not install the Grunt task runner! The job of the Grunt CLI is simple: run the version of Grunt which has been installed next to a Gruntfile. This allows multiple versions of Grunt to be installed on the same machine simultaneously.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!