我想通过终端从 gruntfile 中获取注册的任务。
例子:
grunt.registerTask('test', ['clean', 'compass', 'uglify', 'cssmin', 'imagemin', 'copy:test', 'ftp-deploy:test', 'clean']);
然后在终端上我会输入类似
$> grunt --listtasks
如果我可以使用如下描述注册每个任务,那就更好了:
grunt.registerTask('test', 'this task deploys to testserver',['clean', 'compass', 'uglify', 'cssmin', 'imagemin', 'copy:test', 'ftp-deploy:test', 'clean']);
那么输出可能是这样的:
$> test: this task deploys to testserver (clean, compass, uglify, cssmin, imagemin, copy:test, ftp-deploy:test, clean)