从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"]
},