From 7b7219b1720d13621c2dfd268cc98b28f3d133c7 Mon Sep 17 00:00:00 2001 From: JustCarmen Date: Sat, 6 Oct 2018 14:59:50 +0200 Subject: [PATCH] Install php-cs-fixer globally --- Gruntfile.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 498a307..d386724 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -97,7 +97,7 @@ module.exports = function(grunt) { 'assets/js/src/jquery.treeview.js' ], dest: 'assets/js/page.js' - }, + } }, // ======================================================================================== @@ -121,6 +121,8 @@ module.exports = function(grunt) { // // Source: https://github.com/FriendsOfPHP/PHP-CS-Fixer // // Configurator: https://mlocati.github.io/php-cs-fixer-configurator/ + // + // To install php-cs-fixer globally use: composer global require friendsofphp/php-cs-fixer // ======================================================================================== phpcsfixer: { @@ -128,7 +130,9 @@ module.exports = function(grunt) { dir: '' }, options: { - bin: '../../vendor/bin/php-cs-fixer', + // use path to global composer directory + cwd: '~/.composer/vendor/bin/', + bin: 'php-cs-fixer', configfile: '.php_cs', quiet: true }