Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从bashshell安装phplint for grunt的命令是什么?_Php_Bash_Gruntjs_Phplint - Fatal编程技术网

从bashshell安装phplint for grunt的命令是什么?

从bashshell安装phplint for grunt的命令是什么?,php,bash,gruntjs,phplint,Php,Bash,Gruntjs,Phplint,我习惯于使用类似 npm install grunt-contrib-jshint --save-dev 用于安装 然而,这并不奏效: npm install grunt-contrib-phplint --save-dev 我在这里找到了这些网站: 但它看起来与我的其余代码不匹配。当然,我需要安装它并修改Gruntfile.js // you must load each module grunt.loadNpmTasks('grunt-contrib-concat'); grunt.

我习惯于使用类似

npm install grunt-contrib-jshint --save-dev
用于安装

然而,这并不奏效:

npm install grunt-contrib-phplint --save-dev
我在这里找到了这些网站:

但它看起来与我的其余代码不匹配。当然,我需要安装它并修改Gruntfile.js

// you must load each module
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-cssmin');
// grunt.loadNpmTasks("grunt-phplint"); // from links

奇怪的是,这个特殊的包没有使用contrib前缀

只需用于安装:

npm install grunt-phplint --save-dev;
要加载任务,请执行以下操作:

grunt.loadNpmTasks("grunt-phplint");
phplint: {
    good: [your_php_dir + "*.php"]
},
最后,要运行任务,请执行以下操作:

grunt.loadNpmTasks("grunt-phplint");
phplint: {
    good: [your_php_dir + "*.php"]
},